@@ -37,10 +37,11 @@ Install guide for Ubuntu:
37
37
3. git checkout develop
38
38
4. mvn clean install -DskipTests
39
39
5. Create the following two files representing the entry point to WebGoat:
40
- ./WebGoat/ __MAIN__/src/main/java/Main.java:
40
+ ./__MAIN__/src/main/java/Main.java:
41
41
import org.owasp.webgoat.plugin.introduction.SqlInjectionLesson5a;
42
42
import org.owasp.webgoat.plugin.introduction.SqlInjectionLesson5b;
43
43
import org.owasp.webgoat.plugin.introduction.SqlInjectionLesson6a;
44
+ import org.cprover.CProver;
44
45
45
46
public class Main {
46
47
@@ -53,7 +54,7 @@ Install guide for Ubuntu:
53
54
/*
54
55
{
55
56
String test = makeTainted("dave");
56
- SqlInjectionLesson5a obj = new SqlInjectionLesson5a ();
57
+ SqlInjectionLesson5a obj = CProver.nondetWithNull ();
57
58
obj.completed(test);
58
59
}
59
60
*/
@@ -62,7 +63,7 @@ Install guide for Ubuntu:
62
63
/*
63
64
{
64
65
String test = makeTainted("dave");
65
- SqlInjectionLesson5b obj = new SqlInjectionLesson5b ();
66
+ SqlInjectionLesson5b obj = CProver.nondetWithNull ();
66
67
try {
67
68
obj.completed(test, null);
68
69
}
@@ -75,7 +76,7 @@ Install guide for Ubuntu:
75
76
/*
76
77
{
77
78
String test = makeTainted(args[0]);
78
- SqlInjectionLesson6a obj = new SqlInjectionLesson6a ();
79
+ SqlInjectionLesson6a obj = CProver.nondetWithNull ();
79
80
try {
80
81
obj.completed(test);
81
82
}
@@ -87,7 +88,7 @@ Install guide for Ubuntu:
87
88
}
88
89
Uncomment one of the blocks (depending on what lesson you want to analyse).
89
90
90
- ./WebGoat/ __MAIN__/pom.xml:
91
+ ./__MAIN__/pom.xml:
91
92
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
92
93
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
93
94
<modelVersion>4.0.0</modelVersion>
@@ -118,12 +119,18 @@ Install guide for Ubuntu:
118
119
</dependency>
119
120
</dependencies>
120
121
</project>
122
+
123
+ And copy CProver's utilities to the build directory:
124
+ mkdir -p ./__MAIN__/src/main/java/org/cprover
125
+ cp -a <security-scanner-root>/benchmarks/LIBRARIES/models/model/src/main/java/org/cprover ./__MAIN__/src/main/java/org
121
126
6. cd __MAIN__
122
127
7. mvn package
123
- 8. cd ..
124
- 9. cd ..
125
- 10. rm -rf ./webgoat-container
126
-
128
+ 8. rm -rf ./target/classes/org/
129
+ 9. Remove directory 'org' inside JAR file: ./target/__MAIN__-8.0.0.M3.jar
130
+ 10. cd ..
131
+ 11. cd ..
132
+ 12. rm -rf ./webgoat-container
133
+
127
134
The WebGoat does not seem to have a deployment step. Fortunately, the whole
128
135
app is relatively small, so we can load everything for each lesson. It means
129
136
that we can pass to the Python driver script these options:
0 commit comments