Skip to content

Instantly share code, notes, and snippets.

@Stolas
Created April 3, 2015 07:55
Show Gist options
  • Save Stolas/74966ca472ddb068a0d7 to your computer and use it in GitHub Desktop.
Save Stolas/74966ca472ddb068a0d7 to your computer and use it in GitHub Desktop.
"Borrowed" from 'YoDawg, I heard you like reversing' by Aaron Portnoy and Brandon Edwards (https://www.exodusintel.com/files/yodawgiheardyoulikereversing.pdf)
recvfrom/WSARecvFrom:
bp WS2_32!WSARecvFrom ".printf \"[+] recvfrom(%x, %x, %x)\n\", poi(@esp+0x4), poi(poi(@esp+0x8)+4), poi(poi(@esp+0x8)); .echo ;g poi(@esp) ;.if (@eax > -1) { db poi(@esp+4) Lpoi(@ebp+0x10); kv } ;g"
ReadFile:
bp kernelbase!ReadFile ".printf \"[+] read(%x, %x, %x)\n\", poi(@ebp+0x8), poi(@ebp+0xc), poi(@ebp+0x10); .echo ;g poi(@ebp+0x4) ; db poi(ebp+0xc) Lpoi(ebp+0x10); kv ;g"
recv/WSARecv:
bp WS2_32!WSARecv ".printf \"[+] recv(%x, %x, %x)\n\", poi(@esp+0x4), poi(poi(@esp+0x8)+4), poi(poi(@esp+0x8)); .echo ;g poi(@esp) ;.if (@eax > -1) { db poi(@esp+4) Lpoi(@ebp+0x10); kv } ;g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment