Error: libc not found
noloader opened this issue · 1 comments
noloader commented
Hi Everyone,
I'm trying to audit a binary on OpenBSD 6.6 x86_64 fully patched. I'm using Checksec master.
Checksec is failing to produce expected output on the platform. It would be nice if Checksec finished the tests it can complete.
RELRO STACK CANARY NX PIE RPATH RUNPATH Symbols FORTIFY Fortified Fortifiable FILE
Full RELRO No canary found NX enabled PIE enabled No RPATH No RUNPATH 1365 Symbols Error: libc not found.
And here is checksec --debug_report
:
$ checksec --debug_report
***** Checksec debug *****
uid=1000(jwalton) gid=1000(jwalton) groups=1000(jwalton), 0(wheel)
OpenBSD openbsd6.home.pvt 6.6 GENERIC.MP#372 amd64
checksec version: 2.1.0 -- 2019072901
OS=OpenBSD
VER=6.6
-r-xr-xr-x 1 root bin 132496 Oct 12 12:34 /bin/cat
/bin/cat: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 1 root bin 181832 Oct 12 12:34 /usr/bin/awk
/usr/bin/awk: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 1 root bin 327824 Oct 12 12:34 /sbin/sysctl
/sbin/sysctl: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 1 root bin 10616 Oct 12 12:34 /usr/bin/uname
/usr/bin/uname: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 1 root bin 10728 Oct 12 12:34 /usr/bin/mktemp
/usr/bin/mktemp: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 1 root bin 534720 Oct 12 12:34 /usr/bin/openssl
/usr/bin/openssl: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 6 root bin 41504 Oct 12 12:34 /usr/bin/grep
/usr/bin/grep: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 1 root bin 19128 Oct 12 12:34 /usr/bin/stat
/usr/bin/stat: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 1 root bin 70944 Oct 12 12:34 /usr/bin/file
/usr/bin/file: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 1 root bin 48920 Oct 12 12:34 /usr/bin/find
/usr/bin/find: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 1 root bin 10680 Oct 12 12:34 /usr/bin/head
/usr/bin/head: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 1 root bin 371120 Oct 12 12:34 /bin/ps
/bin/ps: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 1 root bin 10640 Oct 12 12:34 /usr/bin/readlink
/usr/bin/readlink: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 1 root bin 10624 Oct 12 12:34 /usr/bin/basename
/usr/bin/basename: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 3 root bin 14856 Oct 12 12:34 /usr/bin/id
/usr/bin/id: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 2 root bin 10728 Oct 12 12:34 /usr/bin/which
/usr/bin/which: ELF 64-bit LSB shared object, x86-64, version 1
-rwxr-xr-x 1 root bin 616848 Oct 11 20:15 /usr/local/bin/wget
/usr/local/bin/wget: ELF 64-bit LSB shared object, x86-64, version 1
-rwxr-xr-x 1 root bin 234584 Oct 11 13:06 /usr/local/bin/curl
/usr/local/bin/curl: ELF 64-bit LSB shared object, x86-64, version 1
-r-xr-xr-x 1 root bin 297072 Oct 12 12:35 /usr/bin/readelf
/usr/bin/readelf: ELF 64-bit LSB shared object, x86-64, version 1
*** can not find command eu-readelf
The command I was running to produce the error is shown below. The results originate from building NSD from sources. But just any compiled program should do.
checksec --file=nsd`
And the debug output:
$ checksec --debug --file=nsd
RELRO STACK CANARY NX PIE RPATH RUNPATH Symbols FORTIFY Fortified Fortifiable FILE
***function filecheck
***function filecheck->RELRO
Full RELRO
***function filecheck->canary
No canary found
***function filecheck->nx
NX enabled
***function filecheck->pie
PIE enabled
***function filecheck->rpath
No RPATH
***function filecheck->runpath
No RUNPATH 1365 Symbols ***function filecheck->fortify
Error: libc not found.
You can find the OpenBSD ISOs here to setup a VM for testing.
Testing on FreeBSD 12.1 and NetBSD 8.1 is OK.
slimm609 commented
Openbsd is not supported, I am open to accepting PRs for Openbsd but do not have the time to learn/troubleshoot bsd