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

  • Hands-On Red Team Tactics
  • Himanshu Sharma Harpreet Singh
  • 405字
  • 2021-08-13 15:36:40

Running Implants

In this case, the bypassuac_eventvwr implant is used for escalating the privileges from ring 3 (user land privs) to SYSTEM. To use an implant, you can execute the following command:

use implant/elevate/bypassuac_eventvwr 

The option is changed from stager to the implant now and just like we did it when configuring the stager, we need to configure the implant before executing it.

We can find the options by executing the following command:

Info 

This will show two options that need to be configured for a successful implant execution: PAYLOAD and ZOMBIE. To set up the payload, execute the following command:

set payload 0  

The question here is, why did we set the payload to 0? For understanding this, we need to reference the value from the Listeners command:

Listeners 

The listeners command will list down all the stagers running. So, when the payload is set to 0 it means the payload will be using the given stager ID 0; that is, the MSHTA stager for implant delivery over to the zombie for execution.

The implant is now ready to be executed on the target system:

Run 

At the time of execution, a new connection is created with the elevated privileges with zombie ID 2. On getting the information regarding the elevated connection, we can see clearly that the privileges were escalated with the * on the user field. The same is mentioned on the ID as well:

We can either use the implant for dumping hash or we can use mimikatz. Koadic supports mimikatz by injecting the DLL into the memory directly. To use mimikatz, run the following command:

use implant/inject/mimikatz_dynwrapx

You can run it directly without changing any settings:

run 

By running the implant, we were able to fetch the NTLM hashes, which can further be used in pivoting.

To execute a command on a zombie we can use the exec_cmd implant, which can be run by executing the following command:

use implant/manage/exec_cmd


CMD option is the command that you want to execute. This implant will execute the command and save the result in a file that will be stored on the %TEMP% directory (as mentioned in the implant settings). We can change the directory accordingly but make sure the directory is writeable.

In this case, we will be executing a command to get the list of users on the system by setting cmd to net user:

set cmd "net user" 

主站蜘蛛池模板: 贡觉县| 兴化市| 沧源| 阳春市| 江门市| 肥乡县| 深州市| 九台市| 林周县| 云霄县| 宣化县| 临桂县| 康保县| 临武县| 遵化市| 金阳县| 营口市| 甘孜县| 逊克县| 平远县| 惠安县| 昌平区| 吉安县| 麻栗坡县| 洛宁县| 万山特区| 军事| 安国市| 建德市| 涞源县| 密山市| 昌图县| 奉贤区| 麻城市| 万源市| 易门县| 大英县| 阳春市| 富锦市| 威宁| 哈巴河县|