-
-
Save SaFiSec/8b394a8987f2b7792e0daaa47a22a76a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import struct | |
def dump_c2_list(c2_list): | |
for i in range(0xFFFFFF): | |
ip = Dword(c2_list + (i*8)) | |
if ip == 0: | |
break; | |
ip = struct.pack('>L', ip) | |
ip = socket.inet_ntoa(str(ip)) | |
port = Word(c2_list + 4 + (i*8)) | |
print('{}:{}'.format(ip, port)) | |
if __name__ == '__main__': | |
c2_ref = FindBinary(0, SEARCH_DOWN, "83 3C C5") | |
c2_list = Dword(c2_ref + 3) | |
dump_c2_list(c2_list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment