File tree 6 files changed +37
-8
lines changed
java/net/continuumsecurity
6 files changed +37
-8
lines changed Original file line number Diff line number Diff line change 15
15
<!-- A Java class to hold the Selenium steps to test the application in depth. Optionally required for in-depth authn/z and session management testing. -->
16
16
<class >net.continuumsecurity.examples.ropeytasks.RopeyTasksApplication</class >
17
17
18
+ <!-- In order to install sslyze on a Linux system, these steps must be followed
19
+ apt-get update
20
+ apt-get install python-pip
21
+ pip install sslyze
22
+ -->
18
23
<sslyze >
19
- <path >/opt/sslyze/sslyze_cli.py</path >
20
- <option >--regular</option >
24
+ <path >sslyze</path >
25
+ <option >--regular</option >
26
+ <targetHost >www.continuumsecurity.net</targetHost >
27
+ <targetPort >443</targetPort >
21
28
</sslyze >
22
29
23
30
<!-- Optional names of the session ID cookies for session management testing. -->
31
38
32
39
<scanner >
33
40
<ignoreUrl >.*logout.*</ignoreUrl >
34
- <spiderUrl >baseUrl</spiderUrl >
41
+ <spiderUrl >baseUrl</spiderUrl >
42
+ <maxDepth >5</maxDepth >
35
43
</scanner >
36
44
37
45
<!-- An upstream proxy through which all HTTP traffic must pass before hitting the target
Original file line number Diff line number Diff line change @@ -92,6 +92,12 @@ public List<String> getSpiderUrls() {
92
92
return spiderUrls ;
93
93
}
94
94
95
+ public int getMaxDepth () {
96
+ String portAsString = validateAndGetString ("scanner.maxDepth" );
97
+ if (portAsString != null && portAsString .length () > 0 ) return Integer .parseInt (portAsString );
98
+ return 10 ;
99
+ }
100
+
95
101
public String getClassName () {
96
102
return validateAndGetString ("class" );
97
103
}
@@ -211,6 +217,16 @@ public int getUpstreamProxyPort() {
211
217
return 80 ;
212
218
}
213
219
220
+ public String getSslHost (){
221
+ return validateAndGetString ("sslyze.targetHost" );
222
+ }
223
+
224
+ public int getSslPort (){
225
+ String portAsString = validateAndGetString ("sslyze.targetPort" );
226
+ if (portAsString != null && portAsString .length () > 0 ) return Integer .parseInt (portAsString );
227
+ return 443 ;
228
+ }
229
+
214
230
public List <String > getSessionIDs () {
215
231
List <String > ids = new ArrayList <String >();
216
232
for (Object o : getXml ().getList ("sessionIds.name" )) {
Original file line number Diff line number Diff line change @@ -365,7 +365,8 @@ public void theApplicationIsSpidered() {
365
365
} catch (Exception e ) {
366
366
e .printStackTrace ();
367
367
}
368
- getSpider ().setMaxDepth (10 );
368
+ int maxDepth = Config .getInstance ().getMaxDepth ();
369
+ getSpider ().setMaxDepth (maxDepth );
369
370
getSpider ().setThreadCount (10 );
370
371
for (String url : Config .getInstance ().getSpiderUrls ()) {
371
372
if (url .equalsIgnoreCase ("baseurl" )) url = Config .getInstance ().getBaseUrl ();
Original file line number Diff line number Diff line change 17
17
*/
18
18
public class SSLyzeSteps {
19
19
final static String OUTFILENAME = "sslyze.output" ;
20
+ static String host =null ;
21
+ static int port =443 ;
20
22
21
- @ When ("^ the SSLyze command is run against the host (.*) on port ( \\ d+)$ " )
22
- public void runSSLTestsOnSecureBaseUrl (String host , int port ) throws IOException {
23
+ @ When ("the SSLyze command is run against the application " )
24
+ public void runSSLTestsOnSecureBaseUrl () throws IOException {
23
25
if (!World .getInstance ().isSslRunCompleted ()) {
26
+ port = Config .getInstance ().getSslPort ();
27
+ host = Config .getInstance ().getSslHost ();
24
28
JSSLyze jSSLLyze = new JSSLyze (Config .getInstance ().getSSLyzePath (), OUTFILENAME );
25
29
jSSLLyze .execute (Config .getInstance ().getSSLyzeOption (),host ,port );
26
30
World .getInstance ().setjSSLyze (jSSLLyze );
Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ public void verifyProtocolHttps() {
245
245
246
246
@ Given ("the HTTP request-response containing the login form" )
247
247
public void findResponseWithLoginform () throws UnsupportedEncodingException {
248
- String regex = "(?i)input[\\ s\\ w=:'\" ]*type\\ s*=\\ s*['\" ]password['\" ]" ;
248
+ String regex = "(?i)input[\\ s\\ w=:'- \" ]*type\\ s*=\\ s*['\" ]password['\" ]" ;
249
249
List <HarEntry > responses = getProxy ().getHistory ();
250
250
responses = getProxy ().findInResponseHistory (regex );
251
251
if (responses == null || responses .size () == 0 )
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Feature: SSL
3
3
Ensure that the SSL configuration of the service is robust
4
4
5
5
Background : Run the SSLyze command only once for all features
6
- When the SSLyze command is run against the host www.continuumsecurity.net on port 443
6
+ When the SSLyze command is run against the application
7
7
8
8
@iriusrisk-ssl_crime
9
9
Scenario : Disable SSL deflate compression in order to mitigate the risk of the CRIME attack
You can’t perform that action at this time.
0 commit comments