Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create scripts to validade if an app is still vulnerable to the attack narrative #447

Merged
merged 2 commits into from
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions owasp-top10-2017-apps/a1/sstype/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ help:
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST) | sort
printf "\n"

## Validate if app is vulnerable to the attack narrative
check-sec:
chmod +x deployments/check-sec.sh
./deployments/check-sec.sh
19 changes: 19 additions & 0 deletions owasp-top10-2017-apps/a1/sstype/deployments/check-sec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
#
# This script verifies if app is vulnerable to the attack narrative
#

echo "secDevLabs: Exploiting your app locally!"
echo "Server-Side Template Injection"

echo

echo "Response:"

filteredResponse=$(curl -s --request GET "http://localhost:10001/?name=\{\{4*4\}\}" | grep "Hello: 16");

if [ "$filteredResponse" != "" ]; then
echo "The app is vulnerable.";
else
echo "Congrats! The app could not be exploited!";
fi
5 changes: 5 additions & 0 deletions owasp-top10-2017-apps/a4/vinijr-blog/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ help:
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST) | sort
printf "\n"

## Validate if app is vulnerable to the attack narrative
check-sec:
chmod +x deployments/check-sec.sh
./deployments/check-sec.sh
19 changes: 19 additions & 0 deletions owasp-top10-2017-apps/a4/vinijr-blog/deployments/check-sec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
#
# This script verifies if app is vulnerable to the attack narrative
#

echo "secDevLabs: Exploiting your app locally!"
echo "XXE to retrieve sensitive information"

echo

echo "Response:"

response=$(curl -s -d @deployments/evilxml.xml localhost:10004/contact.php ; echo);

if [ "$(echo $response | grep 'root:x:0:0:root:/root:/bin/bash')" != "" ]; then
echo "The app is vulnerable.";
else
echo "Congrats! The app could not be exploited!";
fi
10 changes: 10 additions & 0 deletions owasp-top10-2017-apps/a4/vinijr-blog/deployments/evilxml.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE root [
<!ENTITY xxe SYSTEM "file:///etc/passwd">
]>
<contact>
<name>&xxe;</name>
<email>[email protected]</email>
<subject>YOU ROCK</subject>
<message>I LOVE WATCHING YOUR SKILLS, MAN</message>
</contact>