Files
ctfkit/templates/__pycache__/pwn_skeleton.cpython-312.pyc
T

25 lines
2.3 KiB
Plaintext
Raw Normal View History

Ë
�½�jºãó†—dZddlmZmZmZmZmZddl­de_ de_
d\Z Z d„Z
d„Zd „Zd
„Zed k(re«y y )
uÐ
PWN skeleton — copy & fill. (p4-team style)
Workflow:
1. Leak (format string / GOT / libc) -> step 1
2. Build ROP / overwrite -> step 2
3. Get shell / read flag -> step 3
é)ÚncÚ
receive_untilÚreceive_until_matchÚsendÚsendline)Ú*ÚinfoÚamd64)zchallenge.hosti9cóÊ—|jd«t|d«|jd«}t|jd«dd«}tj d|«|S)zGLeak libc/stack/PIE base. Adapt to the vuln (format string shown here).sname > s
%9$p|%11$pó
ó|réz
leak = %#x)Ú
recv_untilrÚintÚsplitÚlogr )ÚsÚlineÚleaks útemplates/pwn_skeleton.pyÚ
step1_leakrsS€à‡L�L�Ôä ˆQ�
ÔØ �<‰<˜Ó €DÜ ˆt�z‰z˜$Ó Ñ" BÓ '€D܇H�Hˆ\˜4Ô Ø €Kócó^—d}|t|«z
}|jd«t||«y)z.Construct payload. Fill with your gadgets/ROP.s(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAs
message > N)Úp64rr)rrÚpayloads rÚ
step2_exploitrs+€à€GØ Œs�4‹yÑ€Gà‡L�L�ÔÜ ˆQ�Õrcó”—|jd«t|d«t|jd¬«j d¬««y)Ns$ scat flag*; cat /flag*é)ÚtimeoutÚreplace)Úerrors)rrÚprintÚrecvallÚdecode)rs rÚstep3r%(s:€Ø‡L�L�ÔÜ ˆQÐ(Ô)Ü ˆ!�)‰)˜Aˆ)Ó
×
%Ñ