PowerShell RAT
PowerShell RAT
• This project must not be used for illegal purposes or for hacking into
system where you do not have permission, it is strictly for educational
purposes and for people to experiment with.
# whoami
• Over 6.5 years of experience in the field of Information
Security
https://github.com/Viralmaniar
• Passionate about offensive and defensive security
https://twitter.com/maniarviral
• Working as a Principal Security Consultant at Threat
Intelligence https://www.linkedin.com/in/viralmaniar
• Assist Red Teamers and Penetration Testers to exfiltrate sensitive information during
internal penetration test, red team engagements or via phishing campaigns
Attacker
Controlled
Gmail Account
RAT modules
Setup
• Throwaway Gmail account
• Modify the $username & $password variables for your account in the
Mail.ps1, MailLogs.ps1, MailClip.ps1 PowerShell files
• PowerShell Logging. However, attacker can clear these locations to avoid logging of the
scripts.
• Look for regularly timed DNS traffic through frequency analysis. However, this can be defeated
using randomisation in connection timing.
• Sysinternal tools such as autorun, sysmon, process explorer and process monitor to review
system configurations. Requires time and resources.
References
• https://docs.microsoft.com/en-
us/dotnet/api/system.drawing.graphics.copyfromscreen?view=netframework-4.8
• https://docs.microsoft.com/en-
us/powershell/module/microsoft.powershell.management/get-
clipboard?view=powershell-5.1
• https://developers.google.com/docs/api/quickstart/python
• https://github.com/googleapis/google-api-python-client
• https://www.pdq.com/blog/powershell-send-mailmessage-gmail/
• https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-
setwindowshookexa
• https://docs.microsoft.com/en-us/windows/win32/winmsg/about-hooks
• Sandeep Ghai from Threat Intelligence for his help on Reverse Shell Module