┌──(root💀kali)-[/home/kali/桌面] └─# ssh col@pwnable.kr -p2222 130 ⨯ col@pwnable.kr's password: Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
____ __ __ ____ ____ ____ _ ___ __ _ ____ | \| |__| || \ / || \ | | / _] | |/ ]| \ | o ) | | || _ || o || o )| | / [_ | ' / | D ) | _/| | | || | || || || |___ | _] | \ | / | | | ` ' || | || _ || O || || [_ __ | \| \ | | \ / | | || | || || || || || . || . \ |__| \_/\_/ |__|__||__|__||_____||_____||_____||__||__|\_||__|\_| - Site admin : daehee87@gatech.edu - IRC : irc.netgarage.org:6667 / #pwnable.kr - Simply type "irssi" command to join IRC now - files under /tmp can be erased anytime. make your directory under /tmp - to use peda, issue `source /usr/share/peda/peda.py` in gdb terminal You have mail. Last login: Sun Feb 623:54:492022 from 14.108.156.37 col@pwnable:~$ ls -al total 36 drwxr-x--- 5 root col 4096 Oct 232016 . drwxr-xr-x 116 root root 4096 Nov 1114:52 .. d--------- 2 root root 4096 Jun 122014 .bash_history -r-sr-x--- 1 col_pwn col 7341 Jun 112014 col -rw-r--r-- 1 root root 555 Jun 122014 col.c -r--r----- 1 col_pwn col_pwn 52 Jun 112014 flag dr-xr-xr-x 2 root root 4096 Aug 202014 .irssi drwxr-xr-x 2 root root 4096 Oct 232016 .pwntools-cache
代码中的p32是将括号里的字符转换为32位小端字节序的格式,32位格式下为4bit,同样的,还有p16,p64这样的函数,p32 转换4bit. p64 和 p16 则分别转换 8 bit 和 2 bit 数字。
process是开启一个进程
将hashcode拆解为4个0x01010101和一个0x1DD905E8.
再接受返回的flag。
1 2 3 4 5 6 7 8 9 10 11 12 13
┌──(root💀kali)-[/home/kali/桌面] └─# python col.py 1 ⨯ /usr/local/lib/python2.7/dist-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release. from cryptography.hazmat.backends import default_backend [+] Connecting to pwnable.kr on port 2222: Done [*] col@pwnable.kr: Distro Ubuntu 16.04 OS: linux Arch: amd64 Version: 4.4.179 ASLR: Enabled [+] Starting remote process bytearray(b'./col') on pwnable.kr: pid 325538 daddy! I just managed to create a hash collision :)