官术网_书友最值得收藏!

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:

  1. Download Sysinternals
  2. Open the PowerShell prompt
  3. Type cd <Sysinternals directory>
  4. 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:

  1. Open the Terminal
  2. Type cd /tmp
  3. Type git clone https://github.com/CoreSecurity/impacket.git
  4. 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:

  1. Open PowerShell as administrator on the target machine
  2. 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'))"
  3. Enable PS-Remoting
  4. Type winrm set winrm/config/client/auth '@{Basic="true"}'
  5. Type winrm set winrm/config/service/auth '@{Basic="true"}'
  6. Type winrm set winrm/config/service '@{AllowUnencrypted="true"}'


To enable PS-Remoting into a target machine, perform the following steps:

  1. Open PowerShell.
  2. Type $options=New-PSSessionOption -SkipCACheck -SkipCNCheck
  3. Type $cred = Get-Credential. This will prompt you for credentials.
  4. 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>"

主站蜘蛛池模板: 吉林市| 沧源| 滕州市| 泗洪县| 辉县市| 灌南县| 宜川县| 盈江县| 开化县| 新化县| 梨树县| 通江县| 成武县| 玛多县| 清河县| 南漳县| 轮台县| 东方市| 喀喇| 栾川县| 仁化县| 政和县| 淮阳县| 盐边县| 宿松县| 乐平市| 浦北县| 江孜县| 木兰县| 如东县| 侯马市| 沭阳县| 房山区| 双辽市| 新沂市| 固阳县| 洛浦县| 乌鲁木齐县| 五大连池市| 娄底市| 衡山县|