YuHuanTin's Blog

内网 ss 服务端搭建

2026/04/08

在某某内网环境下,手机需要通过某内网设备来连接到互联网(内网设备已连接外网),且为了安全考虑,所以采用 ss 的加密,故有此篇记录

下载&启动 ss 服务端

选取 https://github.com/shadowsocks/shadowsocks-rust

笔者使用 shadowsocks-v1.24.0.x86_64-pc-windows-gnu.zip 进行测试

1
2
3
4
5
6
7
8
9
10
\shadowsocks-v1.24.0.x86_64-pc-windows-gnu 的目录

2026/04/08 05:56 <DIR> .
2026/04/08 05:56 <DIR> ..
2026/04/08 04:51 9,754,112 sslocal.exe
2025/12/11 08:22 7,732,224 ssmanager.exe
2025/12/11 08:21 7,635,456 ssserver.exe
2026/04/08 04:51 10,604,032 ssservice.exe
2025/12/11 08:20 2,496,000 ssurl.exe
2026/04/08 04:51 10,598,912 sswinservice.exe

生成密钥

1
ssservice.exe genkey -m "aes-256-gcm"

编写 config.json

1
2
3
4
5
6
7
8
9
{
"server": "0.0.0.0",
"server_port": 8388,
"password": "你生成的密钥或自定义密码",
"method": "aes-256-gcm",
"timeout": 300,
"fast_open": true,
"mode": "tcp_and_udp"
}

启动服务端(这里不做服务安装,仅作为 cli server)

1
ssserver.exe -c config.json

导出 ss 链接

1
ssurl.exe -e config.json

注意

由于服务端接收 0.0.0.0 也就是所有 ip 请求,所以生成的 ss 链接也是 0.0.0.0 所以需要改成目标设备 ip,例如 192.168.1.2@8388

注意最后要开启对应端口的防火墙,例如 8388


1+13T Root 记录

2026/03/23

1+13T 刷机记录

目标:SukiSU-Ultra


准备

https://yun.daxiaamu.com/OnePlus_Roms/一加OnePlus 13T/

新机搭载 ColorOS PKX110_15.0.2.602(CN01) ,上面没有

1
2
3
4
5
> getprop | grep ro.build.display
[ro.build.display.full_id]: [PKX110domestic_11_15.0.2.602(CN01)_2025090420480208]
[ro.build.display.id]: [PKX110_15.0.2.602(CN01)]
[ro.build.display.id.show]: [PKX110_15.0.2.602(CN01)]
[ro.build.display.ota]: [PKX110_11_A.53]

https://optool.daxiaamu.com/install_adb_drivers?src=pctool 下载并安装 fastboot 驱动

解锁BL

开发者 → OEM 解锁 开启

1
2
3
> adb devices
List of devices attached
<hide> device
1
adb reboot bootloader
1
2
> fastboot devices
<hide> fastboot
1
2
3
> fastboot flashing unlock
OKAY [ 0.016s]
Finished. Total time: 0.016s

按音量下键并确认,出现黄字即成功

Root

本来想要采用 DSU + GSI Sideload 的方式启动下载本机的 init_boot.img 的,但是没找到编译好的,要不就是版本不对,所以不采用 DSU + GSI Sideload 的方式

更新系统到 603

https://yun.daxiaamu.com/OnePlus_Roms/一加OnePlus 13T/ColorOS PKX110_15.0.2.603(CN01) A.54/

系统 → 软件更新 → 本地更新,使用全量包安装

提取 img

https://yun.daxiaamu.com/files/tool/Fastboot Enhance/

加载全量包的 payload.bin 使用工具提取 init_boot.imgboot.img

image.png

刷入 img

首先安装 SukiSu.apk,将刚才提取的 init_boot.img 进行修补,下载修补完成的 img

eg. kernelsu_patched_20241231_195134.img

进入 bootloader

1
adb reboot bootloader

注意这是持久化刷入

1
fastboot flash init_boot path\to\kernelsu_patched_20241231_195134.img
1
fastboot reboot

刷入 TWRP(可不刷)

https://yun.daxiaamu.com/files/TWRP/OnePlus 13T/kmiit/

1
adb reboot bootloader

fastboot 下

1
fastboot getvar all

slot-count: 如果显示 2,说明是 A/B 分区;如果显示 1 或找不到,则是传统的 A-only 分区

current-slot: 显示当前活跃的分区(如 a 或 b)

has-slot:recovery: 如果显示 yes,说明你有独立的 recovery 分区;如果显示 no,说明你的 Recovery 是集成在 boot 分区(或 Android 13+ 的 init_boot / vendor_boot)里的

1
fastboot flash recovery_? TWRP.img

在拥有全量包的情况下其实无需安装 TWRP,如果出现故障,fastboot boot 到 TWRP 临时用即可

备份

字库备份

吐槽:这是哪个大聪明发明的词,就是备份分区 :(

使用多系统工具箱 / TWRP 直接备份均可,super 可不用备份

保留 root 升级

见视频

不可禁用/删除 app

名称 解决方案
软件包安装程序 使用 CrossProfileTestApp.apk 禁用 or CtsPermissionApp(未测试) 应该卸载 oplus.appdetail

需要删除的

com.coloros.phonemanager

com.oplus.appdetail

基本模块

名称 功能
https://github.com/Dr-TSNG/ZygiskNext
https://t.me/lsposed_irena
https://github.com/re-zero001/LSPosed-Irena
https://github.com/KOWX712/PlayIntegrityFix https://github.com/osm0sis/PlayIntegrityFork 谷歌商店修复
https://github.com/5ec1cff/TrickyStore 隐藏 tee 损坏
https://github.com/KOWX712/Tricky-Addon-Update-Target-List 同上,配置
shamiko? 隐藏 root?

ref

https://optool.daxiaamu.com/

https://github.com/eritpchy/FingerprintPay/releases(指纹)

https://www.bilibili.com/video/av115547337459255(晨钟酱)

https://www.bilibili.com/video/av115042041206760

https://www.bilibili.com/video/av616455200/ or https://www.bilibili.com/video/av616455200/(CrossProfileTestApp)


SU_Protocol-WriteUp

2026/03/17

前言

此题采取 Themida 静态压缩 + 动态修改密钥 + 预期多解的思路防止 ai 一把梭(被一些师傅骂 misc 了 😭

WP

密钥写在段名中,预期解法是 x64dbg 运行时进行 dump,由于 Themida 的原因一定会查看段内存(下断点),所以人类选手(应该)能找到此 key

1
su2026-keysecret

image.png

有个别师傅被 ida 坑了,见下图

image.png

流程

注册 /flag POST 路由来接收用户输入

image.png


整体字段(感谢 r3 的师傅图表做的这么好 :D)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Offset  Value         Meaning
------ ----- -------
0 0x60 Magic byte
1-2 0x00 0x7C Big-endian length = 124
3 0x80 Header byte (from hint)
4 0x55 Type byte (abs(0x55) = 0x55 = type 85)
5 0x00 Default Padding

--- payload ---
6 0x80 Magic byte (must be 0x80)
7-110 [104 bytes] TEA-encrypted data (13 blocks × 8 bytes)
111-126 [16 bytes] TEA key = "su2026_keysecret"
---------------

127 [checksum] (byte3 + byte4 + byte5 + sum(bytes 6..126)) & 0xFF
128 0x16 Trailing byte (from hint)

构造 payload (使用正确的 key 和 delta 进行 tea 加密)

1
802ba5e6806f7dd07b988241146e350f481ec220fe1536b67193671193ca08060fd065ddf9c197a119d2f732d8c574e7fc8ca862a2a15e3e7312df0fe81b0f810bf27f7f8982b9a1880ac3d3fd128acabe866e82655cb2b536edf8714ec03162c91ed2c534c132a3347375323032362d6b6579736563726574

构造整体

1
2
60 00 7c 80		           55 00 <payload> 45 16
^len of payload + 3 ^opcode ^check sum of(payload + index 3,4,5)
1
60007c805500802ba5e6806f7dd07b988241146e350f481ec220fe1536b67193671193ca08060fd065ddf9c197a119d2f732d8c574e7fc8ca862a2a15e3e7312df0fe81b0f810bf27f7f8982b9a1880ac3d3fd128acabe866e82655cb2b536edf8714ec03162c91ed2c534c132a3347375323032362d6b65797365637265744516

补上外层 #\n 之后再做一次 hex string

1
#60007c805500802ba5e6806f7dd07b988241146e350f481ec220fe1536b67193671193ca08060fd065ddf9c197a119d2f732d8c574e7fc8ca862a2a15e3e7312df0fe81b0f810bf27f7f8982b9a1880ac3d3fd128acabe866e82655cb2b536edf8714ec03162c91ed2c534c132a3347375323032362d6b65797365637265744516\x0a
1
233630303037633830353530303830326261356536383036663764643037623938383234313134366533353066343831656332323066653135333662363731393336373131393363613038303630666430363564646639633139376131313964326637333264386335373465376663386361383632613261313565336537333132646630666538316230663831306266323766376638393832623961313838306163336433666431323861636162653836366538323635356362326235333665646638373134656330333136326339316564326335333463313332613333343733373533323330333233363264366236353739373336353633373236353734343531360a

对该字符串做 md5 即为 flag

flag: SUCTF{ad1b51464c1b679fe731c7d718af241f}

反调试

image.png

image.png

image.png

image.png

当检测父进程为 explorer.execmd.exe 时,对程序进行修补

delta = 0x9E3779B0

Other

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
struct ranges // sizeof=0x10
{
void *start;
void *end;
};
struct ranges2 // sizeof=0x10
{ // XREF: sub_7FF7C5D5F380/r
// sub_7FF7C5D5F3E0/r
void *start; // XREF: sub_7FF7C5D5F380+25/w
// sub_7FF7C5D5F380+38/w ...
_QWORD len; // XREF: sub_7FF7C5D5F380+2E/w
// sub_7FF7C5D5F3E0+2E/w
};
struct __unaligned vec // sizeof=0x18
{ // XREF: unpackData/r
// unpackData/r
_QWORD start; // XREF: unpackData+23/r
// unpackData+36/r ...
_QWORD end; // XREF: unpackData+28/r
// unpackData+3B/r ...
_QWORD len;
};
struct __unaligned ProtocolData // sizeof=0x79
{
_BYTE flag;
_DWORD data[26];
_DWORD key[4];
};

unpackData

编译器做了向量优化,这里可以看出结构体总大小为 121 字节,10523 * 4 + 3 处有部分重合

image.png

反序列化

将函数从十六进制字符串转换为 bytes,要求第一个字节为 0x60,然后

image.png

可以看出将 payload 写入结构体

image.png

补码计算,约束 opcode = 0x55 走正确的 unpackData 逻辑