- Kali Linux 2018:Assuring Security by Penetration Testing
- Shiva V. N Parasram Alex Samm Damian Boodoo Gerard Johansen Lee Allen Tedi Heriyanto Shakeel Ali
- 428字
- 2021-06-24 18:19:08
Exploits for Windows
Windows exploits are typically targeted toward listening services of the operating system. Here is a list that targets the SMB service that runs on port 445 of Windows:
- Eternalblue – MS17-010
- MS08-67
- MS03-026
The following are some tools often used by pen testers:
- PsExec:
PsExec is a tool included in the Sysinternals toolkit; it is used for remote management and is a popular tool among pen testers, system admins, and hackers. The PsExec binary is usually copied to the $admin share on the machine, then it uses remote management to create a service on the remote machine. Keep in mind that PsExec requires admin privileges on the remote machine:
- Download Sysinternals
- Open the PowerShell prompt
- Type cd <Sysinternals directory>
- Type .\PSexec \\<IP addr of remote machine> -u <user> -p <password> <cmd>
The following screenshot depicts the output obtained:
- Impacket: A collection of Python classes for working with network protocols.
The initial setup can be done as follows:
- Open the Terminal
- Type cd /tmp
- Type git clone https://github.com/CoreSecurity/impacket.git
- Type pip install
Use the following commands to enable PSexec, WMI, and SMBexec on Impacket:
- PSexec:
psexec.py <username>:<password>@<ip addr> powershell
The output of the preceding command is shown in the following screenshot:
- WMI:
wmiexec.py <username>:<password>@<ip addr> powershell
The output of the preceding command is shown in the following screenshot:
- SMBexec:
wmiexec.py <username>:<password>@<ip addr>
The output of the preceding command is shown in the following screenshot:?
- PS-Remoting:
To enable PS-Remoting on a target machine, perform the following steps:
- Open PowerShell as administrator on the target machine
- Type the following: powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1'))"
- Enable PS-Remoting
- Type winrm set winrm/config/client/auth '@{Basic="true"}'
- Type winrm set winrm/config/service/auth '@{Basic="true"}'
- Type winrm set winrm/config/service '@{AllowUnencrypted="true"}'
To enable PS-Remoting into a target machine, perform the following steps:
- Open PowerShell.
- Type $options=New-PSSessionOption -SkipCACheck -SkipCNCheck
- Type $cred = Get-Credential. This will prompt you for credentials.
- Type Enter-PSSession -ComputerName <hostname> -UseSSL -SessionOption $options -Credential $cred.
You will get to see the configuration details, as shown in the following screenshot:
In a similar manner, we will also see how to enable WMI on remote target and use WMI to access a remote target
- WMI: Enabling WMI on a remote target can be done by open PowerShell as Administrator and run the following command:
netsh firewall set service RemoteAdmin enable
To use WMI to access a remote target can be done by open PowerShell, type the following command and observe the output as shown in the following screenshot:
wmic /node:<target IP addr> /user:<username> process call create "cmd.exe /c <command>"
- Android應用安全實戰:Frida協議分析
- Kali Linux CTF Blueprints
- 零信任網絡:在不可信網絡中構建安全系統
- INSTANT Burp Suite Starter
- 黑客攻防與無線安全從新手到高手(超值版)
- Digital Forensics with Kali Linux
- 網絡關鍵設備安全檢測實施指南
- 交換機·路由器·防火墻(第2版)
- 網絡安全監控實戰:深入理解事件檢測與響應
- 社會工程:防范釣魚欺詐(卷3)
- Hands-On Bug Hunting for Penetration Testers
- 云安全深度剖析:技術原理及應用實踐
- 互聯網域名國際化與安全技術導論
- 大數據時代的智慧城市與信息安全
- 云原生安全