diff --git a/AttackGrams.pptx b/AttackGrams.pptx index 9eaa2655..d5fd1bdb 100644 Binary files a/AttackGrams.pptx and b/AttackGrams.pptx differ diff --git a/insecureinc/src/main/resources/insecure/inc/validate.java b/insecureinc/src/main/resources/insecure/inc/validate.java new file mode 100644 index 00000000..e48106fa --- /dev/null +++ b/insecureinc/src/main/resources/insecure/inc/validate.java @@ -0,0 +1,9 @@ +// validate.java and validate.properties are the files that compose the validate.jar file that is part of challenge CWE-798 +class Validate { + public static void main(String[] a) { + System.out.println("Insecure Inc. Compatibility Validator Version 1.5"); + System.out.println("System Check in progress..."); + System.out.println("System Check completed."); + System.out.println("Your system is compatible!"); + } +} diff --git a/insecureinc/src/main/resources/insecure/inc/validate.properties b/insecureinc/src/main/resources/insecure/inc/validate.properties new file mode 100644 index 00000000..313c3a5c --- /dev/null +++ b/insecureinc/src/main/resources/insecure/inc/validate.properties @@ -0,0 +1,5 @@ +version=1.5 +retries=3 +user=svc.validate.insecure.inc +pass=V@lid@ti0n44! +directory=temp diff --git a/insecureinc/src/main/webapp/cwe798.jsp b/insecureinc/src/main/webapp/cwe798.jsp new file mode 100644 index 00000000..c98dd800 --- /dev/null +++ b/insecureinc/src/main/webapp/cwe798.jsp @@ -0,0 +1,67 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page import="inc.insecure.*" %> +<%@ page import="insecure.inc.Constants" %> +<% +String alertVisibility="hidden"; +String usr = request.getParameter("usr"); +String pwd = request.getParameter("pwd"); + +if(usr!=null && pwd!=null){ + alertVisibility=""; + if(usr.equals("demo") && pwd.equals("demo1234")){ + request.getSession().setAttribute("cwe798loggedin", true); + response.sendRedirect("cwe798loggedin.jsp"); + } + + //see if the service account is tried + if(usr.equals("svc.validate.insecure.inc") && pwd.equals("V@lid@ti0n44!")){ + session.setAttribute(Constants.CHALLENGE_ID,"cwe798"); + response.sendRedirect(Constants.SECRET_PAGE); + } +} + + +%> + + +
+ +Welcome to CWE798 - Use of Hard-coded Credentials! You can use the following guest account credentials to login,
+user: demo
, password: demo1234
In order to fully utilize Insecure Inc. you must perform a system test to confirm your system has the minimum operating requirements.
+To perform the system test, you must have Java installed. Then download the Insecure Inc. System Validator and run the following command:
+java -jar validate.jar+