Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Karan Preet Singh Sasan committed Dec 18, 2023
2 parents df5207c + a867b67 commit 713a0f3
Show file tree
Hide file tree
Showing 8 changed files with 1,059 additions and 59 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ jobs:
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ![OWASP VulnerableApp](https://raw.githubusercontent.com/SasanLabs/VulnerableApp/master/docs/logos/Coloured/iconColoured.png) OWASP VulnerableApp

![OWASP Incubator](https://img.shields.io/badge/owasp-incubator-blue.svg) ![](https://img.shields.io/github/v/release/SasanLabs/VulnerableApp?style=flat) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Java CI with Gradle](https://github.com/SasanLabs/VulnerableApp/workflows/Java%20CI%20with%20Gradle/badge.svg) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![Docker Pulls](https://badgen.net/docker/pulls/sasanlabs/owasp-vulnerableapp?icon=docker&label=pulls)](https://hub.docker.com/r/sasanlabs/owasp-vulnerableapp/)
![OWASP Incubator](https://img.shields.io/badge/owasp-incubator-blue.svg) ![](https://img.shields.io/github/v/release/SasanLabs/VulnerableApp?style=flat) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Java CI with Gradle](https://github.com/SasanLabs/VulnerableApp/workflows/Java%20CI%20with%20Gradle/badge.svg) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![Docker Pulls](https://badgen.net/docker/pulls/sasanlabs/owasp-vulnerableapp?icon=docker&label=pulls)](https://hub.docker.com/r/sasanlabs/owasp-vulnerableapp/) [![codecov](https://codecov.io/gh/SasanLabs/VulnerableApp/graph/badge.svg?token=DTS3PA8WXZ)](https://codecov.io/gh/SasanLabs/VulnerableApp)

As Web Applications are becoming popular these days, there comes a dire need to secure them. Although there are several Vulnerability Scanning Tools, however while developing these tools, developers need to test them. Moreover, they also need to know how well the Vulnerability Scanning tool is performing. As of now, there are little or no such vulnerable applications existing for testing such tools. There are Deliberately Vulnerable Applications existing in the market but they are not written with such an intent and hence lag extensibility, e.g. adding new vulnerabilities is quite difficult. Hence, developers resort to writing their own vulnerable applications, which usually causes productivity loss and the pain of reworking.

Expand Down Expand Up @@ -92,6 +92,9 @@ In case you are stuck with any of the steps or understanding anything related to
2. [Overview of Owasp-VulnerableApp - Blogspot post](https://hussaina-begum.blogspot.com/2020/10/an-extensible-vulnerable-application.html)
3. [Introduction to Owasp VulnerableApp by Kenji Nakajima](https://jpn.nec.com/cybersecurity/blog/220520/index.html)

### Troubleshooting references
1. [Reddit exploiting SQL Injection Vulnerability](https://www.reddit.com/r/hacking/comments/11wtf17/owasp_vulnerableappfacade_sql_injection/)

### Readme in other languages

1. [Russian](https://github.com/SasanLabs/VulnerableApp/tree/master/docs/i18n/ru/README.md)
Expand Down
67 changes: 37 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,36 +62,40 @@ spotless {
}

jib {
from {
image = 'openjdk:8-jre-alpine'
platforms {

platform {
architecture = 'amd64'
os = 'linux'
}
platform {
architecture = 'arm64'
os = 'linux'
}
platform {
architecture = '386'
os = 'linux'
}
platform {
architecture = 's390x'
os = 'linux'
}
platform {
architecture = 'ppc64le'
os = 'linux'
}
}

}
to {
image = 'sasanlabs/owasp-vulnerableapp:unreleased'
}
to {
image = 'sasanlabs/owasp-vulnerableapp:unreleased'
}

// Set up multi-platform build only if the task is not :jibDockerBuild
if (!project.gradle.startParameter.taskNames.contains("jibDockerBuild")) {
logger.info("JIB: Enabling Multi-Platform Images")

from {
image = 'openjdk:8-jre-alpine'
platforms {
platform {
architecture = 'amd64'
os = 'linux'
}
platform {
architecture = 'arm64'
os = 'linux'
}
platform {
architecture = '386'
os = 'linux'
}
platform {
architecture = 's390x'
os = 'linux'
}
platform {
architecture = 'ppc64le'
os = 'linux'
}
}
}
}
}

jacoco {
Expand All @@ -115,6 +119,7 @@ tasks.register('GenerateSampleVulnerability'){
}
println 'Copy of html/css/js files is completed'
println 'SampleVulnerability is generated !!!'
enabled = false
}

dependencies {
Expand Down Expand Up @@ -149,6 +154,8 @@ dependencies {
implementation group: 'commons-io', name: 'commons-io', version: '2.7'

implementation group: 'io.github.sasanlabs', name: 'facade-schema', version: '1.0.1'

implementation group: 'commons-fileupload', name: 'commons-fileupload', version: '1.5'
}

test {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ public UnrestrictedFileUpload() throws IOException, URISyntaxException {
"If you are running vulnerableApp as a Jar then UnrestrictedFileUpload will not work. "
+ "For more information: https://github.com/SasanLabs/VulnerableApp/issues/255",
e);
if (root != null) {
if (root == null || !root.toFile().exists()) {
root = Files.createTempDirectory(null);
}
if (contentDispositionRoot != null) {
if (contentDispositionRoot == null || !contentDispositionRoot.toFile().exists()) {
contentDispositionRoot = Files.createTempDirectory(null);
}
}
Expand Down
62 changes: 36 additions & 26 deletions src/main/resources/scripts/PathTraversal/UserInfo.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
[
{
"Name" : "NirraIshq",
"Branch": "Jigri Yaar",
"From": "Punjab"
},
{
"Name" : "Jayant Mittal",
"Branch": "Mechanical",
"From": "Matili"
},
{
"Name" : "Amit Kumar",
"Branch": "Civil",
"From": "Suratgarh"
},
{
"Name" : "Karn Singh",
"Branch": "Computer Science",
"From": "Chandigarh"
},
{
"Name" : "Onkar Singh",
"Branch": "Computer Science",
"From": "Raisinghnagar"
}
]
{
"Name":"NirraIshq",
"Branch":"Jigri Yaar",
"From":"Punjab"
},
{
"Name":"Jayant Mittal",
"Branch":"Mechanical",
"From":"Matili"
},
{
"Name":"Amit Kumar",
"Branch":"Civil",
"From":"Suratgarh"
},
{
"Name":"Karn Singh",
"Branch":"Computer Science",
"From":"Chandigarh"
},
{
"Name":"Onkar Singh",
"Branch":"Computer Science",
"From":"Raisinghnagar"
},
{
"Name":"Subharthi Kundu",
"Branch":"Computer Science",
"From":"Delhi"
},
{
"Name":"Canada Paajis",
"Branch":"Computer Science",
"From":"Surrey"
}
]
Loading

0 comments on commit 713a0f3

Please sign in to comment.