chaitin / xray

一款完善的安全评估工具,支持常见 web 安全问题扫描和自定义 poc | 使用之前务必先阅读文档
https://docs.xray.cool
Other
10.41k stars 1.83k forks source link

Bug on Termux #1754

Closed testusr383 closed 1 year ago

testusr383 commented 1 year ago

Termux环境下无法启动。安卓10。无法Root。未关闭SELinux。

# u0_a36 @ localhost in ~/1111 [8:16:41]
$ l
total 129M
drwx------  2 u0_a36 u0_a36 3.5K Sep 23 08:12 .
drwx------ 11 u0_a36 u0_a36 3.5K Sep 23 08:06 ..
-rwxrwxrwx  1 u0_a36 u0_a36  64M Sep 23 08:07 xpoc_linux_arm64
-rwxrwxrwx  1 u0_a36 u0_a36  65M Sep 23 08:07 xray_linux_arm64

# u0_a36 @ localhost in ~/1111 [8:17:14]
$ ./xpoc_linux_arm64 -t http://192.168.10.1 -o result.html
zsh: no such file or directory: ./xpoc_linux_arm64

# u0_a36 @ localhost in ~/1111 [8:18:10] C:127
$ ./xray_linux_arm64 webscan --basic-crawler http://192.168.10.1 --html-output vuln.html
zsh: no such file or directory: ./xray_linux_arm64

# u0_a36 @ localhost in ~/1111 [8:18:32] C:127
$

如果换成Bash就出现:

# u0_a36 @ localhost in ~/1111 [8:25:47] C:127
$ bash
~/1111 $ ./xpoc_linux_arm64
bash: ./xpoc_linux_arm64: cannot execute: required file not found
~/1111 $ ./xpoc_linux_arm64
bash: ./xpoc_linux_arm64: cannot execute: required file not found
~/1111 $ exit
exit

# u0_a36 @ localhost in ~/1111 [8:26:00] C:127
$
testusr383 commented 1 year ago

ldd出现:

# u0_a36 @ localhost in ~/1111 [8:29:58] C:1
$ ldd x*
xpoc_linux_arm64:
        libpthread.so.0 => not found
        libc.so.6 => not found
        ld-linux-aarch64.so.1 => not found
xray_linux_arm64:
        libpthread.so.0 => not found
        libc.so.6 => not found
        ld-linux-aarch64.so.1 => not found

# u0_a36 @ localhost in ~/1111 [8:30:02]
$
testusr383 commented 1 year ago

自己解决了。 这个文件可能不完全是静态编译,ldd命令看还是有依赖。 https://m.bilibili.com/opus/734853326671183881