You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given an active SSH connection, it Pwntools should be able to tell me about the remote system via e.g. ssh().checksec().
Operating System
Only Linux is supported, only if Python is installed
Detect distribution and version (via /etc/lsb-release or platform.linux_distribution)
Notably, linux_distribution gives me Jessie on some Ubuntu systems (??)
System-wide NX State
From /proc/cpuinfo
System-wide ASLR State
randomize_va_space
mmap_rnd_bits and mmap_rnd_compat_bits
Benign emulation checks
Running under qemu-system
Running under qemu-user
Susceptibility to CTF tricks
ulimit -s unlimited ASLR bypass goes away with Linux v4.4
The checks should also be usable locally without SSH. We can do this with inspect to marshal entire functions via preexec_fn in the ssh().process(...) arguments. This way we can just execute the functions locally -- but can use them remotely.
The text was updated successfully, but these errors were encountered:
Actually, it looks like they backported the ulimit checks to lots of kernels, and each distro did their own thing. We'll have to actually check (which is easy, just upload an ELF).
Looks like this:
[x] Connecting to example.pwnme on port 22
[+] Connecting to example.pwnme on port 22: Done
[*] user@example.pwnme:
Distro Ubuntu 14.04
OS: linux
Arch: amd64
Version: 3.11.0
ASLR: Enabled
Note: Susceptible to ASLR ulimit trick (CVE-2016-3672)
FixesGallopsled#753
Looks like this:
[x] Connecting to example.pwnme on port 22
[+] Connecting to example.pwnme on port 22: Done
[*] user@example.pwnme:
Distro Ubuntu 14.04
OS: linux
Arch: amd64
Version: 3.11.0
ASLR: Enabled
Note: Susceptible to ASLR ulimit trick (CVE-2016-3672)
Fixes#753
Given an active SSH connection, it Pwntools should be able to tell me about the remote system via e.g.
ssh().checksec()
./etc/lsb-release
orplatform.linux_distribution
)linux_distribution
gives me Jessie on some Ubuntu systems (??)/proc/cpuinfo
randomize_va_space
mmap_rnd_bits
andmmap_rnd_compat_bits
qemu-system
qemu-user
ulimit -s unlimited
ASLR bypass goes away with Linux v4.4The checks should also be usable locally without SSH. We can do this with
inspect
to marshal entire functions viapreexec_fn
in thessh().process(...)
arguments. This way we can just execute the functions locally -- but can use them remotely.The text was updated successfully, but these errors were encountered: