slimm609 / checksec

Checksec
https://slimm609.github.io/checksec
Other
2.04k stars 306 forks source link

Error: libc not found on Loongnix LoongArch-64 #189

Closed xiaoxiaoafeifei closed 2 years ago

xiaoxiaoafeifei commented 2 years ago

Hi Everyone,

I'm trying to audit a binary on loongnix LoongArch-64. I'm using Checksec master.

Checksec is failing to produce expected output on the platform. As shown below 2021-12-10 10-12-05 创建的截图

And here is checksec --debug_report: zll@zll-pc:~/checksec.sh$ ./checksec --debug_report Checksec debug uid=1000(zll) gid=1000(zll) groups=1000(zll),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),110(netdev),113(bluetooth),115(lpadmin),117(scanner) Linux zll-pc 4.19.167-rc5.lnd.1-loongson-3 #1 SMP Sat Apr 17 07:32:32 UTC 2021 loongarch64 loongarch64 loongarch64 GNU/Linux -rwxr-xr-x 1 root root 35512 Feb 9 2021 /usr/bin/cat /usr/bin/cat: ELF 64-bit LSB executable, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=10f2fa3006eaf4dd5a5f6e28064a106aca0fb1ab, stripped lrwxrwxrwx 1 root root 21 Apr 21 2021 /usr/bin/awk -> /etc/alternatives/awk -rwxr-xr-x 1 root root 681840 Sep 14 2018 /usr/bin/gawk /usr/bin/gawk: ELF 64-bit LSB shared object, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=4351e13b7640e9faf2e77aa5e48c9df3fc8092b3, stripped -rwxr-xr-x 1 root root 35400 May 31 2018 /sbin//sysctl /sbin//sysctl: ELF 64-bit LSB shared object, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=4aa237aba603f1ec343990f5fffbbd512a99fabd, stripped -rwxr-xr-x 1 root root 35424 Feb 9 2021 /usr/bin/uname /usr/bin/uname: ELF 64-bit LSB executable, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=bf8bb050371344a24e5acfac2fdee5cbb05b382d, stripped -rwxr-xr-x 1 root root 51960 Feb 9 2021 /usr/bin/mktemp /usr/bin/mktemp: ELF 64-bit LSB executable, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=24b601c62bf7376eace5e78ae58d1902f7f33a2c, stripped -rwxr-xr-x 1 root root 731120 Sep 1 14:50 /usr/bin/openssl /usr/bin/openssl: ELF 64-bit LSB shared object, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=41647945199aab43682000fb151aff5acd8b20d1, stripped -rwxr-xr-x 1 root root 199928 Jan 7 2019 /usr/bin/grep /usr/bin/grep: ELF 64-bit LSB shared object, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=e0d67142a14a3958efccd6907aeed050fcf5eba7, stripped -rwxr-xr-x 1 root root 84984 Feb 9 2021 /usr/bin/stat /usr/bin/stat: ELF 64-bit LSB executable, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=11c648ab6b33def84aa98479370ce0128118f810, stripped -rwxr-xr-x 1 root root 35496 Nov 18 2020 /usr/bin/file /usr/bin/file: ELF 64-bit LSB shared object, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=e0729c010a2b514f4fe663d9e74c8131566e74a2, stripped -rwxr-xr-x 1 root root 317496 Feb 16 2019 /usr/bin/find /usr/bin/find: ELF 64-bit LSB shared object, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=a68e2d334fb4ec3be7999397a3eb5c0a8c70313e, stripped -rwxr-xr-x 1 root root 51880 Feb 9 2021 /usr/bin/head /usr/bin/head: ELF 64-bit LSB executable, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=a0e96e08eef01e3fde33651e31fd043463fde5cd, stripped -rwxr-xr-x 1 root root 134576 May 31 2018 /usr/bin/ps /usr/bin/ps: ELF 64-bit LSB shared object, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=71a0fca2228dae09a58bb148ecf4df4ddadd2f5f, stripped -rwxr-xr-x 1 root root 51864 Feb 9 2021 /usr/bin/readlink /usr/bin/readlink: ELF 64-bit LSB executable, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=714aad74c22b26f3720c51746e7fb2395502e995, stripped -rwxr-xr-x 1 root root 35416 Feb 9 2021 /usr/bin/basename /usr/bin/basename: ELF 64-bit LSB executable, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=eb175647e74f99ea58efefc4730a9e3073eda650, stripped -rwxr-xr-x 1 root root 51944 Feb 9 2021 /usr/bin/id /usr/bin/id: ELF 64-bit LSB executable, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=96e7f989e11451b0549fe18da0d496dd961f947f, stripped -rwxr-xr-x 1 root root 946 Jan 22 2019 /usr/bin/which /usr/bin/which: POSIX shell script, ASCII text executable -rwxr-xr-x 1 root root 472712 Apr 14 2021 /usr/bin/wget /usr/bin/wget: ELF 64-bit LSB shared object, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=a5510cd32a4cf6f624e970311c2944e059cd7fb1, stripped -rwxr-xr-x 1 root root 232608 Feb 22 2020 /usr/bin/curl /usr/bin/curl: ELF 64-bit LSB shared object, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=775c24ba16b3ccc57bf618e4c429522e0830b69f, stripped lrwxrwxrwx 1 root root 29 Apr 20 2021 /usr/bin/readelf -> loongarch64-linux-gnu-readelf -rwxr-xr-x 1 root root 601136 Apr 20 2021 /usr/bin/loongarch64-linux-gnu-readelf /usr/bin/loongarch64-linux-gnu-readelf: ELF 64-bit LSB executable, LoongArch-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=794a4ec390d39ca4c3ef0ecc59ca9f5e4bcde62b, stripped *** can not find command eu-readelf

slimm609 commented 2 years ago

fixed in #193