[ITAS.VN]CheckMarx-CxSuite-Sample result for webgoat5.3rc1
Upcoming SlideShare
Loading in...5
×
 

[ITAS.VN]CheckMarx-CxSuite-Sample result for webgoat5.3rc1

on

  • 21,702 views

Báo cáo kiểm tra của sản phẩm CxSuite cho ứng dụng WebGoat5.3RC1

Báo cáo kiểm tra của sản phẩm CxSuite cho ứng dụng WebGoat5.3RC1

Statistics

Views

Total Views
21,702
Views on SlideShare
21,702
Embed Views
0

Actions

Likes
0
Downloads
31
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

[ITAS.VN]CheckMarx-CxSuite-Sample result for webgoat5.3rc1 [ITAS.VN]CheckMarx-CxSuite-Sample result for webgoat5.3rc1 Presentation Transcript

  • Scan ReportProject Name: webgoat_2/2/2011 3:44:27 PMScan Time: 2/2/2011 3:59:44 PM Vulnerability Distribution Top 5 Vulnerailities Most Vulnerable Files www.itas.vn info@itas.vn .
  • Scan Report SummaryVulnerability Vulnerability Group Problems Severity foundCode Injection Java High Risk 1XPath Injection Java High Risk 5Reflected XSS All Clients Java High Risk 367Stored XSS Java High Risk 124Command Injection Java High Risk 6SQL injection Java High Risk 54DOM Code Injection JavaScript Vulnerabilities 1Trust Boundary Violation Java Medium Threat 148Parameter Tampering Java Medium Threat 44HttpSplitting Java Medium Threat 8SQL Injection Evasion Java Medium Threat 2AttackXSRF Java Medium Threat 8Environment Java Medium Threat 38ManipulationHardcoded password in Java Medium Threat 1Connection StringFiles Manipulation Java Medium Threat 18CGI Reflected XSS All Java Medium Threat 42ClientsCGI Stored XSS Java Medium Threat 18Potential O Reflected Java Potential 24XSS All ClientsSingleton HTTPServlet Java Low Visibility 1Hardcoded Password Java Low Visibility 22Verbose Error Reporting Java Low Visibility 332 www.itas.vn info@itas.vn .
  • Potential Stored XSS Java Potential 37Cookie not Sent Over Java Low Visibility 5SSLBlind SQL Injections Java Low Visibility 49DoS by Unreleased Java Low Visibility 2ResourcesImproper Exception Java Low Visibility 175HandlingEquals without Java Low Visibility 2GetHashCodeThread Safety Violation Java Struts 15In Action ClassThread Safety Issue Java Low Visibility 31Weak Cryptographic Java Low Visibility 6AlgorithmURL Redirection Attack Java Low Visibility 3Overly Broad Throws Java Best Coding Practice 45Pages Without Global Java Best Coding Practice 8Error HandlerCatch Without General Java Best Coding Practice 192Exception HandlingLeftover Debug Code Java Best Coding Practice 3Visible Fields Java Best Coding Practice 11Unclosed Objects Java Best Coding Practice 23Magic Numbers Java Best Coding Practice 9Dynamic SQL Queries Java Best Coding Practice 88Missing Catch Block Java Best Coding Practice 6Erroneous String Java Best Coding Practice 1CompareUse of System Output Java Best Coding Practice 160StreamEmpty Catch Java Best Coding Practice 50Overly Broad Catch Java Best Coding Practice 247No Default Case Java Best Coding Practice 1 www.itas.vn info@itas.vn Nam.
  • Single Line If Statement Java Best Coding Practice 117Confusing Naming Java Best Coding Practice 14 www.itas.vn info@itas.vn Nam.
  • Top 10 Files (High and Medium) File Name Problems FoundParameterParser.java 345BackDoors.java 42DefaultLessonAction.java 36WebSession.java 30UncheckedEmail.java 27SessionFixation.java 16ViewProfile.java 16JavaScriptValidation.java 15Encoding.java 15AbstractLesson.java 14 www.itas.vn info@itas.vn .
  • Failure to Control Generation of Code (Code Injection)Weakness ID: 94 (Weakness Class) Status: DrafDescriptionDescription Summary The product does not sufficiently filter code (control-plane) syntax from user-controlled input (data plane) when that input is used within code that the product generates.Extended Description When software allows a users input to contain code syntax, it might be possible for an attacker to craft the code in such a way that it will alter the intended control flow of the software. Such an alteration could lead to arbitrary code execution. Injection problems encompass a wide variety of issues -- all mitigated in very different ways. For this reason, the most effective way to discuss these weaknesses is to note the distinct features which classify them as injection weaknesses. The most important issue to note is that all injection problems share one thing in common -- i.e., they allow for the injection of control plane data into the user-controlled data plane. This means that the execution of the process may be altered by sending code in through legitimate data channels, using no other mechanism. While buffer overflows, and many other flaws, involve the use of some further issue to gain execution, injection problems need only for the data to be parsed. The most classic instantiations of this category of weakness are SQL injection and format string vulnerabilities.Time of Introduction l Architecture and Design l ImplementationApplicable PlatformsLanguages Interpreted languages: (Sometimes)Common ConsequencesScope EffectConfidentiality The injected code could access restricted data / filesAuthentication In some cases, injectable code controls authentication; this may lead to a remote vulnerabilityAccess Control Injected code can access resources that the attacker is directly prevented from accessingIntegrity Code injection attacks can lead to loss of data integrity in nearly all cases as the control-plane data injected is always incidental to data recall or writing. Additionally, code injection can often result in the execution of arbitrary code.Accountability Often the actions performed by injected control code are unlogged.Likelihood of Exploit MediumDemonstrative ExamplesExample 1This example attempts to write user messages to a message file and allow users to view them. (Bad Code) Example Language: PHP $MessageFile = "cwe-94/messages.out"; if ($_GET["action"] == "NewMessage") { $name = $_GET["name"]; $message = $_GET["message"]; $handle = fopen($MessageFile, "a+"); fwrite($handle, "<b$name</b says $message<hrn"); fclose($handle); echo "Message Saved!<pn"; } else if ($_GET["action"] == "ViewMessages") { include($MessageFile); }While the programmer intends for the MessageFile to only include data, an attacker can provide a message such as: (Attack) name=h4x0r message=%3C?php%20system(%22/bin/ls%20-l%22);?%3E www.itas.vn info@itas.vn .
  • which will decode to the following: (Attack) <?php system("/bin/ls -l");?The programmer thought they were just including the contents of a regular data file, but PHP parsed it and executed thecode. Now, this code is executed any time people view messages.Notice that XSS (CWE-79) is also possible in this situation.Potential Mitigations www.itas.vn info@itas.vn .
  • Phase: Architecture and DesignRefactor your program so that you do not have to dynamically generate code.Phase: Architecture and DesignRun your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and theoperating system. This may effectively restrict which code can be executed by your software.Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection.This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your applicationmay still be subject to compromise.Be careful to avoid CWE-243 and other weaknesses related to jails.Phase: ImplementationStrategy: Input ValidationAssume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a whitelist of acceptableinputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, ortransform it into something that does. Do not rely exclusively on looking for malicious or malformed inputs (i.e., do notrely on a blacklist). However, blacklists can be useful for detecting potential attacks or determining which inputs are somalformed that they should be rejected outright.When performing input validation, consider all potentially relevant properties, including length, type of input, the fullrange of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance tobusiness rules. As an example of business rule logic, "boat" may be syntactically valid because it only containsalphanumeric characters, but it is not valid if you are expecting colors such as "red" or "blue."To reduce the likelihood of code injection, use stringent whitelists that limit which constructs are allowed. If you aredynamically constructing code that invokes a function, then verifying that the input is alphanumeric might be insufficient.An attacker might still be able to reference a dangerous function that you did not intend to allow, such as system(), exec(), or exit().Phase: TestingUse automated static analysis tools that target this type of weakness. Many modern techniques use data flow analysis tominimize the number of false positives. This is not a perfect solution, since 100% accuracy and coverage are not feasible.Phase: TestingUse dynamic tools and techniques that interact with the software using large test suites with many diverse inputs, suchas fuzz testing (fuzzing), robustness testing, and fault injection. The softwares operation may slow down, but it shouldnot become unstable, crash, or generate incorrect results.Phase: OperationRun the code in an environment that performs automatic taint propagation and prevents any command execution thatuses tainted variables, such as Perls "-T" switch. This will force you to perform validation steps that remove the taint,although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs asuntainted (see CWE-183 and CWE-184).RelationshipsNature Type ID NameChildOf 74 Failure to Sanitize Data into a Different Plane (Injection) 699 1000ChildOf 691 Insufficient Control Flow Management 1000ChildOf 752 2009 Top 25 - Risky Resource Management 750ParentOf 95 Improper Sanitization of Directives in Dynamically Evaluated Code (Eval Injection) 699 1000ParentOf 96 Improper Neutralization of Directives in Statically Saved Code (Static Code Injection) 699 1000ParentOf 621 Variable Extraction Error 1000ParentOf 627 Dynamic Variable Evaluation 699 1000MemberOf 635 Weaknesses Used by NVD 635CanFollow 98 Improper Control of Filename for Include/Require Statement in PHP Program (PHP File 699 Inclusion) 1000Research GapsMany of these weaknesses are under-studied and under-researched, and terminology is not sufficiently precise.Taxonomy MappingsMapped Taxonomy Name Node ID Fit Mapped Node Name www.itas.vn info@itas.vn .
  • PLOVER CODE Code Evaluation and InjectionRelated Attack PatternsCAPEC-ID Attack Pattern Name (CAPEC Version: 1.5)35 Leverage Executable Code in Nonexecutable Files77 Manipulating User-Controlled VariablesContent HistorySubmissionsSubmission Date Submitter Organization Source www.itas.vn info@itas.vn .
  • PLOVER Externally MinedModificationsModification Date Modifier Organization Source2008-07-01 Eric Dalci Cigital External updated Time of Introduction2008-09-08 CWE Content Team MITRE Internal updated Applicable Platforms, Relationships, Research Gaps, Taxonomy Mappings2009-01-12 CWE Content Team MITRE Internal updated Common Consequences, Demonstrative Examples, Description, Likelihood of Exploit, Name, Potential Mitigations, Relationships2009-03-10 CWE Content Team MITRE Internal updated Potential Mitigations2009-05-27 CWE Content Team MITRE Internal updated Demonstrative Examples, Name2010-02-16 CWE Content Team MITRE Internal updated Potential MitigationsPrevious Entry NamesChange Date Previous Entry Name2009-01-12 Code Injection2009 -05 -27 Failure to Control Generation of Code (aka Code Injection) BACK TO TOP www.itas.vn info@itas.vn .
  • Path 1:Query Name - Code InjectionSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 681. else if (values[0].length() == 0) ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 693. value = value.substring(0, value.indexOf("&")); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);80. protected Element createContent(WebSession s) //BlindScript.java ..... 122. String code = s.getParser().getStringParameter(CODE, ""); ..... 126. if (!code.equals("")) ..... 130. loadMe(s, code, method, argTypes, params);239. public static String loadMe(WebSession s, String clazz, String method, String argTypes, String params) throws IOException //BlindScript.java ..... 243. Class cls = (Class.forName(clazz)); www.itas.vn info@itas.vn .
  • Improper Sanitization of Special Elements used in a Command (Command Injection)Weakness ID: 77 (Weakness Class) Status: DrafDescriptionDescription Summary The software constructs all or part of a command using externally-influenced input from an upstream component, but it does not sanitize or incorrectly sanitizes special elements that could modify the intended command when it is sent to a downstream component.Extended Description Command injection vulnerabilities typically occur when: 1. Data enters the application from an untrusted source. 2. The data is part of a string that is executed as a command by the application. 3. By executing the command, the application gives an attacker a privilege or capability that the attacker would not otherwise have.Time of Introduction l Architecture and Design l ImplementationApplicable PlatformsLanguages AllCommon ConsequencesScope EffectAccess Control Command injection allows for the execution of arbitrary commands and code by the attacker.Integrity If a malicious user injects a character (such as a semi-colon) that delimits the end of one command and the beginning of another, it may be possible to then insert an entirely new and unrelated command that was not intended to be executed.Likelihood of Exploit Very HighDemonstrative ExamplesExample 1The following simple program accepts a filename as a command line argument and displays the contents of the file back tothe user. The program is installed setuid root because it is intended for use as a learning tool to allow systemadministrators in-training to inspect privileged system files without giving them the ability to modify them or damage thesystem. Example Language: C int main(char* argc, char** argv) { char cmd[CMD_MAX] = "/usr/bin/cat "; strcat(cmd, argv[1]); system(cmd); }Because the program runs with root privileges, the call to system() also executes with root privileges. If a user specifies astandard filename, the call works as expected. However, if an attacker passes a string of the form ";rm -rf /", then the callto system() fails to execute cat due to a lack of arguments and then plows on to recursively delete the contents of theroot partition.Example 2The following code is from an administrative web application designed to allow users to kick off a backup of an Oracledatabase using a batch-file wrapper around the rman utility and then run a cleanup.bat script to delete some temporaryfiles. The script rmanDB.bat accepts a single command line parameter, which specifies what type of backup to perform.Because access to the database is restricted, the application runs the backup as a privileged user. (Bad Code) Example Language: Java ... String btype = request.getParameter("backuptype"); String cmd = new String("cmd.exe /K " c:utilrmanDB.bat " +btype+ "&&c:utlcleanup.bat"") System.Runtime.getRuntime().exec(cmd); ... www.itas.vn info@itas.vn .
  • The problem here is that the program does not do any validation on the backuptype parameter read from the user.Typically the Runtime.exec() function will not execute multiple commands, but in this case the program first runs thecmd.exe shell in order to run multiple commands with a single call to Runtime.exec(). Once the shell is invoked, it willhappily execute multiple commands separated by two ampersands. If an attacker passes a string of the form "& delc:dbms*.*", then the application will execute this command along with the others specified by the program. Because ofthe nature of the application, it runs with the privileges necessary to interact with the database, which means whatevercommand the attacker injects will run with those privileges as well.Example 3The following code from a system utility uses the system property APPHOME to determine the directory in which it isinstalled and then executes an initialization script based on a relative path from the specified directory. www.itas.vn info@itas.vn .
  • (Bad Code) Example Language: Java ... String home = System.getProperty("APPHOME"); String cmd = home + INITCMD; java.lang.Runtime.getRuntime().exec(cmd); ...The code above allows an attacker to execute arbitrary commands with the elevated privilege of the application bymodifying the system property APPHOME to point to a different path containing a malicious version of INITCMD. Becausethe program does not validate the value read from the environment, if an attacker can control the value of the systemproperty APPHOME, then they can fool the application into running malicious code and take control of the system.Example 4The following code is from a web application that allows users access to an interface through which they can update theirpassword on the system. Part of the process for updating passwords in certain network environments is to run a makecommand in the /var/yp directory, the code for which is shown below. (Bad Code) Example Language: Java ... System.Runtime.getRuntime().exec("make"); ...The problem here is that the program does not specify an absolute path for make and fails to clean its environment prior toexecuting the call to Runtime.exec(). If an attacker can modify the $PATH variable to point to a malicious binary calledmake and cause the program to be executed in their environment, then the malicious binary will be loaded instead of theone intended. Because of the nature of the application, it runs with the privileges necessary to perform system operations,which means the attackers make will now be run with these privileges, possibly giving the attacker complete control of thesystem.Example 5The following code is a wrapper around the UNIX command cat which prints the contents of a file to standard out. It isalso injectable: (Bad Code) Example Language: C #include <stdio.h #include <unistd.h int main(int argc, char **argv) { char cat[] = "cat "; char *command; size_t commandLength; commandLength = strlen(cat) + strlen(argv[1]) + 1; command = (char *) malloc(commandLength); strncpy(command, cat, commandLength); strncat(command, argv[1], (commandLength - strlen(cat)) ); system(command); return (0); }Used normally, the output is simply the contents of the file requested: $ ./catWrapper Story.txt When last we left our heroes...However, if we add a semicolon and another command to the end of this line, the command is executed by catWrapperwith no complaint: (Attack) $ ./catWrapper Story.txt; ls When last we left our heroes... Story.txt SensitiveFile.txt PrivateData.db a.out*If catWrapper had been set to have a higher privilege level than the standard user, arbitrary commands could be executedwith that higher privilege. www.itas.vn info@itas.vn .
  • Potential MitigationsPhase: Architecture and DesignIf at all possible, use library calls rather than external processes to recreate the desired functionalityPhase: ImplementationIf possible, ensure that all external commands called from the program are statically created.Phase: Implementation www.itas.vn info@itas.vn .
  • Strategy: Input ValidationAssume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a whitelist of acceptableinputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, ortransform it into something that does. Do not rely exclusively on looking for malicious or malformed inputs (i.e., do notrely on a blacklist). However, blacklists can be useful for detecting potential attacks or determining which inputs are somalformed that they should be rejected outright.When performing input validation, consider all potentially relevant properties, including length, type of input, the fullrange of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance tobusiness rules. As an example of business rule logic, "boat" may be syntactically valid because it only containsalphanumeric characters, but it is not valid if you are expecting colors such as "red" or "blue."Run time: Run time policy enforcement may be used in a white-list fashion to prevent use of any non-sanctionedcommands.Assign permissions to the software system that prevents the user from accessing/opening privileged files.Other NotesCommand injection is a common problem with wrapper programs.Weakness OrdinalitiesOrdinality DescriptionPrimary (where the weakness exists independent of other weaknesses)RelationshipsNature Type ID NameChildOf 20 Improper Input Validation 700ChildOf 74 Failure to Sanitize Data into a Different Plane (Injection) 699 1000ChildOf 713 OWASP Top Ten 2007 Category A2 - Injection Flaws 629ChildOf 722 OWASP Top Ten 2004 Category A1 - Unvalidated Input 711ChildOf 727 OWASP Top Ten 2004 Category A6 - Injection Flaws 711ParentOf 78 Improper Sanitization of Special Elements used in an OS Command (OS Command Injection) 699 1000ParentOf 88 Argument Injection or Modification 699 1000ParentOf 89 Improper Sanitization of Special Elements used in an SQL Command (SQL Injection) 699 1000ParentOf 90 Failure to Sanitize Data into LDAP Queries (LDAP Injection) 699 1000ParentOf 624 Executable Regular Expression Error 699 1000f Causal NatureExplicitTaxonomy MappingsMapped Taxonomy Name Node ID Fit Mapped Node Name7 Pernicious Kingdoms Command InjectionCLASP Command injectionOWASP Top Ten 2007 A2 CWE More Specific Injection FlawsOWASP Top Ten 2004 A1 CWE More Specific Unvalidated InputOWASP Top Ten 2004 A6 CWE More Specific Injection FlawsRelated Attack PatternsCAPEC-ID Attack Pattern Name (CAPEC Version: 1.5)15 Command Delimiters23 File System Function Injection, Content Based43 Exploiting Multiple Input Interpretation Layers75 Manipulating Writeable Configuration Files6 Argument Injection11 Cause Web Server Misclassification76 Manipulating Input to File System CallsReferencesG. Hoglund and G. McGraw. "Exploiting Software: How to Break Code". Addison-Wesley. February 2004. www.itas.vn info@itas.vn .
  • Content HistorySubmissionsSubmission Date Submitter Organization Source 7 Pernicious Kingdoms Externally MinedModificationsModification Date Modifier Organization Source2008-07-01 Eric Dalci Cigital External updated Time of Introduction2008-08-15 Veracode External Suggested OWASP Top Ten 2004 mapping www.itas.vn info@itas.vn .
  • 2008-09-08 CWE Content Team MITRE Internal updated Common Consequences, Relationships, Other Notes, Taxonomy Mappings, Weakness Ordinalities2009-05-27 CWE Content Team MITRE Internal updated Demonstrative Examples, Name2009-07-27 CWE Content Team MITRE Internal updated Demonstrative Examples, Description, Name2009-10-29 CWE Content Team MITRE Internal updated Common Consequences, Description, Other Notes, Potential Mitigations2010-02-16 CWE Content Team MITRE Internal updated Potential Mitigations, RelationshipsPrevious Entry NamesChange Date Previous Entry Name2008-04-11 Command Injection2009-05-27 Failure to Sanitize Data into a Control Plane (aka Command Injection)2009 -07 -27 Failure to Sanitize Data into a Control Plane (Command Injection) BACK TO TOP www.itas.vn info@itas.vn .
  • Path 1:Query Name - Command InjectionSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);616. protected ElementContainer getNetstatResults(WebSession s) //Challenge2Screen.java ..... 637. String protocol = s.getParser().getRawParameter(PROTOCOL, "tcp"); ..... 643. String cmd = "cmd.exe /c netstat -a -p " + protocol; 644. er = Exec.execSimple(cmd);441. public static ExecResults execSimple(String[] command) //Exec.java ..... 443. return (execOptions(command, "", 0, 0, false));93. public static ExecResults execOptions(String[] command, String input, int successCode, int timeout, boolean lazy) //Exec.java ..... 106. child = Runtime.getRuntime().exec(command);Path 2:Query Name - Command InjectionSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);616. protected ElementContainer getNetstatResults(WebSession s) //Challenge2Screen.java ..... 637. String protocol = s.getParser().getRawParameter(PROTOCOL, "tcp"); ..... 643. String cmd = "cmd.exe /c netstat -a -p " + protocol; 644. er = Exec.execSimple(cmd);453. public static ExecResults execSimple(String command) //Exec.java www.itas.vn info@itas.vn .
  • .....455. return (execOptions(command, "", 0, 0, false)); www.itas.vn info@itas.vn .
  • 275. public static ExecResults execOptions(String command, String input, int successCode, int timeout, boolean lazy) //Exec.java ..... 288. child = Runtime.getRuntime().exec(command);Path 3:Query Name - Command InjectionSeverity - High616. protected ElementContainer getNetstatResults(WebSession s) //Challenge2Screen.java ..... 637. String protocol = s.getParser().getRawParameter(PROTOCOL, "tcp"); ..... 643. String cmd = "cmd.exe /c netstat -a -p " + protocol; 644. er = Exec.execSimple(cmd);441. public static ExecResults execSimple(String[] command) //Exec.java ..... 443. return (execOptions(command, "", 0, 0, false));93. public static ExecResults execOptions(String[] command, String input, int successCode, int timeout, boolean lazy) //Exec.java ..... 106. child = Runtime.getRuntime().exec(command);Path 4:Query Name - Command InjectionSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);616. protected ElementContainer getNetstatResults(WebSession s) //Challenge2Screen.java ..... 637. String protocol = s.getParser().getRawParameter(PROTOCOL, "tcp"); ..... 643. String cmd = "cmd.exe /c netstat -a -p " + protocol; 644. er = Exec.execSimple(cmd);441. public static ExecResults execSimple(String[] command) //Exec.java ..... 443. return (execOptions(command, "", 0, 0, false));93. public static ExecResults execOptions(String[] command, String input, int successCode, int timeout, boolean lazy) //Exec.java ..... 106. child = Runtime.getRuntime().exec(command);Path 5:Query Name - Command InjectionSeverity - High616. protected ElementContainer getNetstatResults(WebSession s) //Challenge2Screen.java ..... www.itas.vn info@itas.vn .
  • 637. String protocol = s.getParser().getRawParameter(PROTOCOL, "tcp");..... www.itas.vn info@itas.vn .
  • 643. String cmd = "cmd.exe /c netstat -a -p " + protocol; 644. er = Exec.execSimple(cmd);453. public static ExecResults execSimple(String command) //Exec.java ..... 455. return (execOptions(command, "", 0, 0, false));275. public static ExecResults execOptions(String command, String input, int successCode, int timeout, boolean lazy) //Exec.java ..... 288. child = Runtime.getRuntime().exec(command);Path 6:Query Name - Command InjectionSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);616. protected ElementContainer getNetstatResults(WebSession s) //Challenge2Screen.java ..... 637. String protocol = s.getParser().getRawParameter(PROTOCOL, "tcp"); ..... 643. String cmd = "cmd.exe /c netstat -a -p " + protocol; 644. er = Exec.execSimple(cmd);453. public static ExecResults execSimple(String command) //Exec.java ..... 455. return (execOptions(command, "", 0, 0, false));275. public static ExecResults execOptions(String command, String input, int successCode, int timeout, boolean lazy) //Exec.java ..... 288. child = Runtime.getRuntime().exec(command); www.itas.vn info@itas.vn .
  • Failure to Preserve Web Page Structure (Cross-site Scripting)Weakness ID: 79 (Weakness Base) Status: UsablDescriptionDescription SummaryThe software does not sufficiently validate, filter, escape, and/or encode user-controllable input before it is placed inoutput that is used as a web page that is served to other users.Extended Description Cross-site scripting (XSS) vulnerabilities occur when: 1. Untrusted data enters a web application, typically from a web request. 2. The web application dynamically generates a web page that contains this untrusted data. 3. During page generation, the application does not prevent the data from containing content that is executable by a web browser, such as JavaScript, HTML tags, HTML attributes, mouse events, Flash, ActiveX, etc. 4. A victim visits the generated web page through a web browser, which contains malicious script that was injected using the untrusted data. 5. Since the script comes from a web page that was sent by the web server, the victims web browser executes the malicious script in the context of the web servers domain. 6. This effectively violates the intention of the web browsers same-origin policy, which states that scripts in one domain should not be able to access resources or run code in a different domain. There are three main kinds of XSS: Type 1: Reflected XSS (or Non-Persistent) The server reads data directly from the HTTP request and reflects it back in the HTTP response. Reflected XSS exploits occur when an attacker causes a victim to supply dangerous content to a vulnerable web application, which is then reflected back to the victim and executed by the web browser. The most common mechanism for delivering malicious content is to include it as a parameter in a URL that is posted publicly or e-mailed directly to the victim. URLs constructed in this manner constitute the core of many phishing schemes, whereby an attacker convinces a victim to visit a URL that refers to a vulnerable site. After the site reflects the attackers content back to the victim, the content is executed by the victims browser. Type 2: Stored XSS (or Persistent) The application stores dangerous data in a database, message forum, visitor log, or other trusted data store. At a later time, the dangerous data is subsequently read back into the application and included in dynamic content. From an attackers perspective, the optimal place to inject malicious content is in an area that is displayed to either many users or particularly interesting users. Interesting users typically have elevated privileges in the application or interact with sensitive data that is valuable to the attacker. If one of these users executes malicious content, the attacker may be able to perform privileged operations on behalf of the user or gain access to sensitive data belonging to the user. For example, the attacker might inject XSS into a log message, which might not be handled properly when an administrator views the logs. Type 0: DOM-Based XSS In DOM-based XSS, the client performs the injection of XSS into the page; in the other types, the server performs the injection. DOM-based XSS generally involves server-controlled, trusted script that is sent to the client, such as Javascript that performs sanity checks on a form before the user submits it. If the server-supplied script processes user- supplied data and then injects it back into the web page (such as with dynamic HTML), then DOM-based XSS is possible. Once the malicious script is injected, the attacker can perform a variety of malicious activities. The attacker could transfer private information, such as cookies that may include session information, from the victims machine to the attacker. The attacker could send malicious requests to a web site on behalf of the victim, which could be especially dangerous to the site if the victim has administrator privileges to manage that site. Phishing attacks could be used to emulate trusted web sites and trick the victim into entering a password, allowing the attacker to compromise the victims account on that web site. Finally, the script could exploit a vulnerability in the web browser itself possibly taking over the victims machine, sometimes referred to as "drive-by hacking." In many cases, the attack can be launched without the victim even being aware of it. Even with careful users, attackers frequently use a variety of methods to encode the malicious portion of the attack, such as URL encoding or Unicode, so the request looks less suspicious.Alternate TermsXSSCSS: "CSS" was once used as the acronym for this problem, but this could cause confusion with "Cascading Style Sheets," so usage of this acronym has declined significantly.Time of Introduction l Architecture and Design l ImplementationApplicable PlatformsLanguages www.itas.vn info@itas.vn .
  • Language-independentArchitectural Paradigms Web-based: (Often)Technology Classes Web-Server: (Often)Platform Notes XSS flaws are very common in web applications since they require a great deal of developer discipline to avoid them.Common Consequences www.itas.vn info@itas.vn .
  • Scope EffectConfidentiality The most common attack performed with cross-site scripting involves the disclosure of information stored in user cookies. Typically, a malicious user will craft a client-side script, which -- when parsed by a web browser -- performs some activity (such as sending all site cookies to a given E-mail address). This script will be loaded and run by each user visiting the web site. Since the site requesting to run the script has access to the cookies in question, the malicious script does also.Access Control In some circumstances it may be possible to run arbitrary code on a victims computer when cross-site scripting is combined with other flaws.Confidentiality The consequence of an XSS attack is the same regardless of whether it is stored or reflected. TheIntegrity difference is in how the payload arrives at the server.Availability XSS can cause a variety of problems for the end user that range in severity from an annoyance to complete account compromise. Some cross-site scripting vulnerabilities can be exploited to manipulate or steal cookies, create requests that can be mistaken for those of a valid user, compromise confidential information, or execute malicious code on the end user systems for a variety of nefarious purposes. Other damaging attacks include the disclosure of end user files, installation of Trojan horse programs, redirecting the user to some other page or site, running "Active X" controls (under Microsoft Internet Explorer) from sites that a user perceives as trustworthy, and modifying presentation of content.Likelihood of Exploit High to Very HighEnabling Factors for ExploitationCross-site scripting attacks may occur anywhere that possibly malicious users are allowed to post unregulated material toa trusted web site for the consumption of other valid users, commonly on places such as bulletin-board web sites whichprovide web based mailing list-style functionality.Stored XSS got its start with web sites that offered a "guestbook" to visitors. Attackers would include JavaScript in theirguestbook entries, and all subsequent visitors to the guestbook page would execute the malicious code. As the examplesdemonstrate, XSS vulnerabilities are caused by code that includes unvalidated data in an HTTP response.Detection MethodsAutomated Static AnalysisUse automated static analysis tools that target this type of weakness. Many modern techniques use data flow analysis tominimize the number of false positives. This is not a perfect solution, since 100% accuracy and coverage are not feasible,especially when multiple components are involved.Effectiveness: ModerateBlack BoxUse the XSS Cheat Sheet [REF-14] or automated test-generation tools to help launch a wide variety of attacks againstyour web application. The Cheat Sheet contains many subtle XSS variations that are specifically targeted against weakXSS defenses.Effectiveness: Moderate With Stored XSS, the indirection caused by the data store can make it more difficult to find the problem. The tester must first inject the XSS string into the data store, then find the appropriate application functionality in which the XSS string is sent to other users of the application. These are two distinct steps in which the activation of the XSS can take place minutes, hours, or days after the XSS was originally injected into the data store.Demonstrative ExamplesExample 1This example covers a Reflected XSS (Type 1) scenario.The following JSP code segment reads an employee ID, eid, from an HTTP request and displays it to the user. (Bad Code) Example Language: JSP <% String eid = request.getParameter("eid"); % ... Employee ID: <%= eid %The following ASP.NET code segment reads an employee ID number from an HTTP request and displays it to the user. (Bad Code) Example Language: ASP.NET ... protected System.Web.UI.WebControls.TextBox Login; protected System.Web.UI.WebControls.Label EmployeeID; ... www.itas.vn info@itas.vn .
  • EmployeeID.Text = Login.Text; ... (HTML follows) ... <p<asp:label id="EmployeeID" runat="server" /</p ...The code in this example operates correctly if the Employee ID variable contains only standard alphanumeric text. If it hasa value that includes meta-characters or source code, then the code will be executed by the web browser as it displays theHTTP response. Initially this might not appear to be much of a vulnerability. After all, why would someone enter a URLthat causes malicious code to run on their own computer? The real danger is that an attacker will create the maliciousURL, then use e-mail or social engineering tricks to lure victims into visiting a link to the URL. When victims click the link,they unwittingly reflect the malicious content through the vulnerable web application back to their own computers.Example 2 www.itas.vn info@itas.vn .
  • (Bad Code)This example covers a Stored XSS (Type 2) scenario.The following JSP code segment queries a database for an employee with a given ID and prints the correspondingemployees name. Example Language: JSP <% ... Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("select * from emp where id="+eid); if (rs != null) { rs.next(); String name = rs.getString("name"); % Employee Name: <%= name %The following ASP.NET code segment queries a database for an employee with a given employee ID and prints the namecorresponding with the ID. (Bad Code) Example Language: ASP.NET protected System.Web.UI.WebControls.Label EmployeeName; ... string query = "select * from emp where id=" + eid; sda = new SqlDataAdapter(query, conn); sda.Fill(dt); string name = dt.Rows[0]["Name"]; ... EmployeeName.Text = name;This code can appear less dangerous because the value of name is read from a database, whose contents are apparentlymanaged by the application. However, if the value of name originates from user-supplied data, then the database can be aconduit for malicious content. Without proper input validation on all data stored in the database, an attacker can executemalicious commands in the users web browser.Observed ExamplesReference DescriptionCVE -2008 -5080 Chain: protection mechanism failure allows XSSCVE -2006 -4308 Chain: only checks "javascript:" tagCVE -2007 -5727 Chain: only removes SCRIPT tags, enabling XSSCVE -2008 -5770 Reflected XSS using the PATH INFO in a URLCVE -2008 -4730 Reflected XSS not properly handled when generating an error messageCVE -2008 -5734 Reflected XSS sent through email message.CVE -2008 -0971 Stored XSS in a security product.CVE -2008 -5249 Stored XSS using a wiki page.CVE -2006 -3568 Stored XSS in a guestbook application.CVE -2006 -3211 Stored XSS in a guestbook application using a javascript: URI in a bbcode img tag.CVE -2006 -3295 Chain: library file is not protected against a direct request (CWE-425), leading to reflected XSS.Potential MitigationsPhase: Architecture and DesignStrategy: Libraries or FrameworksUse a vetted library or framework that does not allow this weakness to occur or provides constructs that make thisweakness easier to avoid.Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsofts Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.Phases: Implementation; Architecture and DesignUnderstand the context in which your data will be used and the encoding that will be expected. This is especiallyimportant when transmitting data between different components, or when generating outputs that can contain multipleencodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocolsand data representations to determine the required encoding strategies.For any data that will be output to another web page, especially any data that was received from external inputs, use theappropriate encoding on all non-alphanumeric characters.Parts of the same output document may require different encodings, which will vary depending on whether the output isin the: l HTML body www.itas.vn info@itas.vn .
  • l Element attributes (such as src="XYZ") l URIs l JavaScript sections l Cascading Style Sheets and style propertyetc. Note that HTML Entity Encoding is only appropriate for the HTML body.Consult the XSS Prevention Cheat Sheet [REF-16] for more details on the types of encoding and escaping that areneeded.Phase: Architecture and Design www.itas.vn info@itas.vn .
  • For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side,in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have beenperformed, or by changing the client to remove the client-side checks entirely. Then, these modified values would besubmitted to the server.Phase: ImplementationUse and specify a strong character encoding such as ISO-8859-1 or UTF-8. When an encoding is not specified, the webbrowser may choose a different encoding by guessing which encoding is actually being used by the web page. This canopen you up to subtle XSS attacks related to that encoding. See CWE-116 for more mitigations related toencoding/escaping.Phase: ImplementationWith Struts, you should write all data from form beans with the beans filter attribute set to true.Phase: ImplementationTo help mitigate XSS attacks against the users session cookie, set the session cookie to be HttpOnly. In browsers thatsupport the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can preventthe users session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not acomplete solution, since HttpOnly is not supported by all browsers. More importantly, XMLHTTPRequest and otherpowerful browser technologies provide read access to HTTP headers, including the Set-Cookie header in which theHttpOnly flag is set.Phase: ImplementationStrategy: Input ValidationAssume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a whitelist of acceptableinputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, ortransform it into something that does. Do not rely exclusively on looking for malicious or malformed inputs (i.e., do notrely on a blacklist). However, blacklists can be useful for detecting potential attacks or determining which inputs are somalformed that they should be rejected outright.When performing input validation, consider all potentially relevant properties, including length, type of input, the fullrange of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance tobusiness rules. As an example of business rule logic, "boat" may be syntactically valid because it only containsalphanumeric characters, but it is not valid if you are expecting colors such as "red" or "blue."When dynamically constructing web pages, use stringent whitelists that limit the character set based on the expectedvalue of the parameter in the request. All input should be validated and cleansed, not just parameters that the user issupposed to specify, but all data in the request, including hidden fields, cookies, headers, the URL itself, and so forth. Acommon mistake that leads to continuing XSS vulnerabilities is to validate only fields that are expected to be redisplayedby the site. It is common to see data from the request that is reflected by the application server or the application thatthe development team did not anticipate. Also, a field that is not currently reflected may be used by a future developer.Therefore, validating ALL parts of the HTTP request is recommended.Note that proper output encoding, escaping, and quoting is the most effective solution for preventing XSS, although inputvalidation may provide some defense-in-depth. This is because it effectively limits what will appear in output. Inputvalidation will not always prevent XSS, especially if you are required to support free-form text fields that could containarbitrary characters. For example, in a chat application, the heart emoticon ("<3") would likely pass the validation step,since it is commonly used. However, it cannot be directly inserted into the web page because it contains the "<"character, which would need to be escaped or otherwise handled. In this case, stripping the "<" might reduce the risk ofXSS, but it would produce incorrect behavior because the emoticon would not be recorded. This might seem to be a minorinconvenience, but it would be more important in a mathematical forum that wants to represent inequalities.Even if you make a mistake in your validation (such as forgetting one out of 100 input fields), appropriate encoding isstill likely to protect you from injection-based attacks. As long as it is not done in isolation, input validation is still auseful technique, since it may significantly reduce your attack surface, allow you to detect some attacks, and provideother security benefits that proper encoding does not address.Ensure that you perform input validation at well-defined interfaces within the application. This will help protect theapplication even if a component is reused or moved elsewhere.Phase: OperationUse an application firewall that can detect attacks against this weakness. This might not catch all attacks, and it mightrequire some effort for customization. However, it can be beneficial in cases in which the code cannot be fixed (because itis controlled by a third party), as an emergency prevention measure while more comprehensive software assurancemeasures are applied, or to provide defense in depth.Background DetailsSame Origin PolicyThe same origin policy states that browsers should limit the resources accessible to scripts running on a given web site ,or "origin", to the resources associated with that web site on the client-side, and not the client-side resources of any www.itas.vn info@itas.vn .
  • other sites or "origins". The goal is to prevent one site from being able to modify or read the contents of an unrelatedsite. Since the World Wide Web involves interactions between many sites, this policy is important for browsers toenforce.DomainThe Domain of a website when referring to XSS is roughly equivalent to the resources associated with that website on theclient-side of the connection. That is, the domain can be thought of as all resources the browser is storing for the usersinteractions with this particular site.Weakness OrdinalitiesOrdinality Description www.itas.vn info@itas.vn .
  • Resultant (where the weakness is typically related to the presence of some other weaknesses)RelationshipsNature Type ID NameChildOf 20 Improper Input Validation 700ChildOf 74 Failure to Sanitize Data into a Different Plane (Injection) 699 1000ChildOf 442 Web Problems 699ChildOf 712 OWASP Top Ten 2007 Category A1 - Cross Site Scripting (XSS) 629ChildOf 722 OWASP Top Ten 2004 Category A1 - Unvalidated Input 711ChildOf 725 OWASP Top Ten 2004 Category A4 - Cross-Site Scripting (XSS) Flaws 711ChildOf 751 2009 Top 25 - Insecure Interaction Between Components 750ChildOf 801 2010 Top 25 - Insecure Interaction Between Components 800CanPrecede 494 Download of Code Without Integrity Check 1000PeerOf 352 Cross-Site Request Forgery (CSRF) 1000ParentOf 80 Improper Sanitization of Script-Related HTML Tags in a Web Page (Basic XSS) 699 1000ParentOf 81 Improper Sanitization of Script in an Error Message Web Page 699 1000ParentOf 83 Improper Neutralization of Script in Attributes in a Web Page 699 1000ParentOf 84 Failure to Resolve Encoded URI Schemes in a Web Page 699 1000ParentOf 85 Doubled Character XSS Manipulations 699 1000ParentOf 86 Improper Neutralization of Invalid Characters in Identifiers in Web Pages 699 1000ParentOf 87 Failure to Sanitize Alternate XSS Syntax 699 1000MemberOf 635 Weaknesses Used by NVD 635CanFollow 113 Failure to Sanitize CRLF Sequences in HTTP Headers (HTTP Response Splitting) 1000CanFollow 184 Incomplete Blacklist 1000 692f Causal NatureExplicitTaxonomy MappingsMapped Taxonomy Name Node ID Fit Mapped Node NamePLOVER Cross-site scripting (XSS)7 Pernicious Kingdoms Cross-site ScriptingCLASP Cross-site scriptingOWASP Top Ten 2007 A1 Exact Cross Site Scripting (XSS)OWASP Top Ten 2004 A1 CWE More Specific Unvalidated InputOWASP Top Ten 2004 A4 Exact Cross-Site Scripting (XSS) FlawsWASC 8 Cross-site ScriptingRelated Attack PatternsCAPEC-ID Attack Pattern Name (CAPEC Version: 1.5)232 Exploitation of Privilege/Trust85 Client Network Footprinting (using AJAX/XSS)86 Embedding Script (XSS ) in HTTP Headers32 Embedding Scripts in HTTP Query Strings18 Embedding Scripts in Nonscript Elements19 Embedding Scripts within Scripts63 Simple Script Injection91 XSS in IMG Tags106 Cross Site Scripting through Log Files198 Cross-Site Scripting in Error Pages199 Cross-Site Scripting Using Alternate Syntax209 Cross-Site Scripting Using MIME Type Mismatch243 Cross-Site Scripting in Attributes244 Cross-Site Scripting via Encoded URI Schemes245 Cross-Site Scripting Using Doubled Characters, e.g. %3C%3Cscript246 Cross-Site Scripting Using Flash247 Cross-Site Scripting with Masking through Invalid Characters in IdentifiersReferences www.itas.vn info@itas.vn .
  • [REF-15] Jeremiah Grossman, Robert "RSnake" Hansen, Petko "pdp" D. Petkov, Anton Rager and Seth Fogie. "XSSAttacks". Syngress. 2007.[REF-17] Michael Howard, David LeBlanc and John Viega. "24 Deadly Sins of Software Security". "Sin 2: Web-ServerRelated Vulnerabilities (XSS, XSRF, and Response Splitting)." Page 31. McGraw-Hill. 2010.[REF-17] Michael Howard, David LeBlanc and John Viega. "24 Deadly Sins of Software Security". "Sin 3: Web-ClientRelated Vulnerabilities (XSS)." Page 63. McGraw-Hill. 2010."Cross-site scripting". Wikipedia. 2008-08-26. <http://en.wikipedia.org/wiki/Cross-site_scripting.[REF-11] M. Howard and D. LeBlanc. "Writing Secure Code". Chapter 13, "Web-Specific Input Issues" Page 413. 2nd www.itas.vn info@itas.vn .
  • Edition. Microsoft. 2002.[REF-14] RSnake. "XSS (Cross Site Scripting) Cheat Sheet". <http://ha.ckers.org/xss.html.Microsoft. "Mitigating Cross-site Scripting With HTTP-only Cookies". <http://msdn.microsoft.com/en-us/library/ms533046.aspx.Mark Curphey, Microsoft. "Anti-XSS 3.0 Beta and CAT.NET Community Technology Preview now Live!".<http://blogs.msdn.com/cisg/archive/2008/12/15/anti-xss-3-0-beta-and -cat-net-community -technology-preview -now -live.aspx."OWASP Enterprise Security API (ESAPI) Project". <http://www.owasp.org/index.php/ESAPI.Ivan Ristic. "XSS Defense HOWTO". <http://blog.modsecurity.org/2008/07/do-you -know -how.html.OWASP. "Web Application Firewall". <http://www.owasp.org/index.php/Web_Application_Firewall.Web Application Security Consortium. "Web Application Firewall Evaluation Criteria".<http://www.webappsec.org/projects/wafec/v1/wasc-wafec-v1.0.html.RSnake. "Firefox Implements httpOnly And is Vulnerable to XMLHTTPRequest". 2007-07-19."XMLHttpRequest allows reading HTTPOnly cookies". Mozilla. <https://bugzilla.mozilla.org/show_bug.cgi?id=380418."Apache Wicket". <http://wicket.apache.org/.[REF-16] OWASP. "XSS (Cross Site Scripting) Prevention Cheat Sheet". <http://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet.Content HistorySubmissionsSubmission Date Submitter Organization Source PLOVER Externally MinedModificationsModification Date Modifier Organization Source2008-07-01 Eric Dalci Cigital External updated Time of Introduction2008-08-15 Veracode External Suggested OWASP Top Ten 2004 mapping2008-09-08 CWE Content Team MITRE Internal updated Alternate Terms, Applicable Platforms, Background Details, Common Consequences, Description, Relationships, Other Notes, References, Taxonomy Mappings, Weakness Ordinalities2009-01-12 CWE Content Team MITRE Internal updated Alternate Terms, Applicable Platforms, Background Details, Common Consequences, Demonstrative Examples, Description, Detection Factors, Enabling Factors for Exploitation, Name, Observed Examples, Other Notes, Potential Mitigations, References, Relationships2009-03-10 CWE Content Team MITRE Internal updated Potential Mitigations2009-05-27 CWE Content Team MITRE Internal updated Name2009-07-27 CWE Content Team MITRE Internal updated Description2009-10-29 CWE Content Team MITRE Internal updated Observed Examples, Relationships2009-12-28 CWE Content Team MITRE Internal updated Demonstrative Examples, Description, Detection Factors, Enabling Factors for Exploitation, Observed Examples2010-02-16 CWE Content Team MITRE Internal updated Applicable Platforms, Detection Factors, Potential Mitigations, References, Relationships, Taxonomy Mappings2010-04-05 CWE Content Team MITRE Internal updated Description, Potential Mitigations, Related Attack PatternsPrevious Entry NamesChange Date Previous Entry Name2008-04-11 Cross-site Scripting (XSS)2009-01-12 Failure to Sanitize Directives in a Web Page (aka Cross-site scripting (XSS))2009 -05 -27 Failure to Preserve Web Page Structure (aka Cross-site Scripting) BACK TO TOP www.itas.vn info@itas.vn .
  • Path 1:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page language="java" contentType="text/html; charset=ISO-8859-1" import="java.util.regex.*" import="org.owasp.webgoat.lessons.DangerousEval" //eval.jsp ..... 5. String field1 = request.getParameter("field1"); ..... 30. out.write("alert(Whoops: You entered an incorrect access code of "" + field1 + "");");Path 2:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page language="java" contentType="text/html; charset=ISO-8859-1" import="java.util.regex.*" import="org.owasp.webgoat.lessons.DangerousEval" //eval.jsp ..... 5. String field1 = request.getParameter("field1"); ..... 34. out.write("alert(Purchase completed successfully with credit card "" + field2 + "" and access code "" + field1 + "");");Path 3:Query Name - Reflected XSS All ClientsSeverity - High1. //clientSideFiltering_i.jsp ..... 9. String userId = request.getParameter("userId"); ..... 35. sb.append("/Employees/Employee [Managers/Manager/text()=" + userId + "]/LastName | "); ..... 39. String expression = sb.toString(); ..... 47. nodes = (NodeList) xPath.evaluate(expression, inputSource, ..... 78. Node node = nodes.item(i); ..... 86. tr.addElement(new TD().addElement(node.getTextContent()));Path 4:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //SearchStaff.jsp ..... 7. String searchedName = request.getParameter(CrossSiteScripting.SEARCHNAME); ..... 11. Employee <%=searchedName%> not found. www.itas.vn info@itas.vn .
  • www.itas.vn info@itas.vn .
  • Path 5:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //SearchStaff.jsp ..... 7. String searchedName = request.getParameter(CrossSiteScripting.SEARCHNAME); ..... 11. Employee <%=searchedName%> not found.Path 6:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //SearchStaff.jsp ..... 7. String searchedName = request.getParameter(DBCrossSiteScripting.SEARCHNAME); ..... 11. Employee <%=searchedName%> not found.Path 7:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //SearchStaff.jsp ..... 7. String searchedName = request.getParameter(DBCrossSiteScripting.SEARCHNAME); ..... 11. Employee <%=searchedName%> not found.Path 8:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //SearchStaff.jsp ..... 7. String searchedName = request.getParameter(DBSQLInjection.SEARCHNAME); ..... 11. Employee <%=searchedName%> not found.Path 9:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //SearchStaff.jsp ..... 7. String searchedName = request.getParameter(DBSQLInjection.SEARCHNAME); ..... 11. Employee <%=searchedName%> not found.Path 10:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //SearchStaff.jsp www.itas.vn info@itas.vn .
  • .....7. String searchedName = request.getParameter(GoatHillsFinancial.SEARCHNAME);..... www.itas.vn info@itas.vn .
  • 11. Employee <%=searchedName%> not found.Path 11:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //SearchStaff.jsp ..... 7. String searchedName = request.getParameter(GoatHillsFinancial.SEARCHNAME); ..... 11. Employee <%=searchedName%> not found.Path 12:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //SearchStaff.jsp ..... 7. String searchedName = request.getParameter(RoleBasedAccessControl.SEARCHNAME); ..... 11. Employee <%=searchedName%> not found.Path 13:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //SearchStaff.jsp ..... 7. String searchedName = request.getParameter(RoleBasedAccessControl.SEARCHNAME); ..... 11. Employee <%=searchedName%> not found.Path 14:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //SearchStaff.jsp ..... 7. String searchedName = request.getParameter(SQLInjection.SEARCHNAME); ..... 11. Employee <%=searchedName%> not found.Path 15:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //SearchStaff.jsp ..... 7. String searchedName = request.getParameter(SQLInjection.SEARCHNAME); ..... 11. Employee <%=searchedName%> not found. www.itas.vn info@itas.vn .
  • Path 16:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High577. public String[] getParameterValues(String name) //ParameterParser.java ..... 581. return request.getParameterValues(name);453. public List<Parameter> getParams() //WebSession.java ..... 466. String[] values = getParser().getParameterValues(name); ..... 470. params.add(new Parameter(name, values[loop]));38. public Parameter(String name, String value) //Parameter.java ..... 41. this.value = value;453. public List<Parameter> getParams() //WebSession.java ..... 470. params.add(new Parameter(name, values[loop])); ..... 478. return params;1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //main.jsp ..... 233. Iterator i = webSession.getParams().iterator(); ..... 236. Parameter p = (Parameter) i.next(); 237. printParameters = "<div id="parameter" class="info">" + p.getName() + "=" + p.getValue() + "</div><br>";44. public String getName() //Parameter.java ..... 46. return name;1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //main.jsp ..... 237. printParameters = "<div id="parameter" class="info">" + p.getName() + "=" + p.getValue() + "</div><br>"; 238. out.println(printParameters);Path 17:Query Name - Reflected XSS All ClientsSeverity - High577. public String[] getParameterValues(String name) //ParameterParser.java ..... 581. return request.getParameterValues(name);169. protected Element createContent(WebSession s) //WSDLScanning.java ..... 202. String[] fields = s.getParser().getParameterValues("field"); ..... 216. header.addElement(new TD().addElement(fields[i])); www.itas.vn info@itas.vn .
  • Path 18:Query Name - Reflected XSS All ClientsSeverity - High www.itas.vn info@itas.vn .
  • 577. public String[] getParameterValues(String name) //ParameterParser.java ..... 581. return request.getParameterValues(name);169. protected Element createContent(WebSession s) //WSDLScanning.java ..... 202. String[] fields = s.getParser().getParameterValues("field"); ..... 217. results.addElement(new TD().addElement((String) accessWGService(s, "WSDLScanning", port, fields[i],139. public Object accessWGService(WebSession s, String serv, int port, String proc, String parameterName, Object parameterValue) //WSDLScanning.java ..... 145. QName operationName = new QName(targetNamespace, proc); ..... 148. call.setOperationName(operationName); 149. call.addParameter(parameterName, serviceName, ParameterMode.INOUT); ..... 152. call.setPassword("guest"); 153. call.setTargetEndpointAddress("http://localhost:" + port + "/" + s.getRequest().getContextPath() + "/services/" + serv); 154. Object result = call.invoke(new Object[] { parameterValue }); 155. return result;169. protected Element createContent(WebSession s) //WSDLScanning.java ..... 217. results.addElement(new TD().addElement((String) accessWGService(s, "WSDLScanning", port, fields[i],Path 19:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);76. protected Element doHTTPSplitting(WebSession s) //HttpSplitting.java ..... 84. lang = URLDecoder.decode(s.getParser().getRawParameter(LANGUAGE, ""), "UTF-8"); ..... 103. String message = lang.substring(lang.indexOf("<html>")); ..... 105. out.print(message); www.itas.vn info@itas.vn .
  • Path 20:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. public void handleRequest(WebSession s) //SilentTransactions.java ..... 74. String amount = s.getParser().getRawParameter("amount", ""); ..... 83. result.append(amount); ..... 88. result.append(" and happens to be logged in the same time will loose their money !!"); 89. out.print(result.toString());Path 21:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);224. protected Element makeUsername(WebSession s) //BackDoors.java ..... 244. String userInput = s.getParser().getRawParameter("username", ""); ..... 249. String formattedInput = "<span class=myClass>" + userInput + "</span>"; 250. ec.addElement(new Div(SELECT_ST + formattedInput));Path 22:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]); www.itas.vn info@itas.vn .
  • 593. public String getRawParameter(String name, String def) //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 597. return getRawParameter(name);70. protected Element createContent(WebSession s) //BlindNumericSqlInjection.java ..... 80. String accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101"); 81. Input input = new Input(Input.TEXT, ACCT_NUM, accountNumber.toString());Path 23:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);70. protected Element createContent(WebSession s) //BlindStringSqlInjection.java ..... 80. String accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101"); 81. Input input = new Input(Input.TEXT, ACCT_NUM, accountNumber.toString());Path 24:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... www.itas.vn info@itas.vn .
  • 168. return buf.toString(); www.itas.vn info@itas.vn .
  • 186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 228. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 25:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 233. Input input = new Input(Input.TEXT, "field1", param1);Path 26:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java www.itas.vn info@itas.vn .
  • ..... www.itas.vn info@itas.vn .
  • 597. return getRawParameter(name);160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 270. tr.addElement(new TD().addElement(new Input(Input.TEXT, "CC", param2)).setAlign("right"));Path 27:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 172. String param1 = s.getParser().getRawParameter("PAC", "111"); ..... 276. tr.addElement(new TD().addElement(new Input(Input.TEXT, "PAC", param1)).setAlign("right"));Path 28:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 615. String[] values = request.getParameterValues(name);..... www.itas.vn info@itas.vn .
  • 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 193. Input input = new Input(Input.TEXT, INPUT, userInput);Path 29:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);146. protected Element createAttackEnvironment(WebSession s) throws Exception //HttpSplitting.java ..... 161. lang = URLDecoder.decode(s.getParser().getRawParameter(LANGUAGE, ""), "UTF-8"); ..... 164. Input input = new Input(Input.TEXT, LANGUAGE, lang.toString());Path 30:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);87. protected Element createContent(WebSession s) //Phishing.java ..... 93. searchText = s.getParser().getRawParameter(SEARCH, ""); ..... 97. ec.addElement(makeSearch(s)); www.itas.vn info@itas.vn .
  • 110. protected Element makeSearch(WebSession s) //Phishing.java ..... www.itas.vn info@itas.vn .
  • 137. Input input1 = new Input(Input.TEXT, SEARCH, searchText);Path 31:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 76. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 76. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 183. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 32:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);143. protected Element makeAccountLine(WebSession s) //SqlAddData.java ..... www.itas.vn info@itas.vn .
  • 148. userid = s.getParser().getRawParameter(USERID, "jsmith"); www.itas.vn info@itas.vn .
  • 149. Input input = new Input(Input.TEXT, USERID, userid.toString());Path 33:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);161. protected Element makeAccountLine(WebSession s) //SqlModifyData.java ..... 166. userid = s.getParser().getRawParameter(USERID, "jsmith"); 167. Input input = new Input(Input.TEXT, USERID, userid.toString());Path 34:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);198. protected Element makeAccountLine(WebSession s) //SqlStringInjection.java ..... 203. accountName = s.getParser().getRawParameter(ACCT_NAME, "Your Name"); 204. Input input = new Input(Input.TEXT, ACCT_NAME, accountName.toString());Path 35:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 597. return getRawParameter(name); www.itas.vn info@itas.vn .
  • 65. protected Element createContent(WebSession s) //TraceXSS.java ..... 75. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();65. protected Element createContent(WebSession s) //TraceXSS.java ..... 75. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 180. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 36:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 74. String param1 = s.getParser().getRawParameter("field1", "111"); ..... 184. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field1", param1)));Path 37:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 597. return getRawParameter(name); www.itas.vn info@itas.vn .
  • 155. protected Element makeAccountLine(WebSession s) //WsSqlInjection.java ..... 161. accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101"); 162. Input input = new Input(Input.TEXT, ACCT_NUM, accountNumber.toString());Path 38:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);60. protected Element createContent(WebSession s) //ViewDatabase.java ..... 68. StringBuffer sqlStatement = new StringBuffer(s.getParser().getRawParameter(SQL, "")); 69. Input input = new Input(Input.TEXT, SQL, sqlStatement.toString());Path 39:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);64. protected Element createContent(WebSession s) //LogSpoofing.java ..... 96. inputUsername = new String(s.getParser().getRawParameter(USERNAME, "")); ..... 99. inputUsername = URLDecoder.decode(inputUsername, "UTF-8"); ..... 106. row4.addElement(new TD(new PRE(WebGoatI18N.get("LoginFailedForUserName")+": " + inputUsername))).setBgColor(HtmlColor.GRAY);Path 40:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException www.itas.vn info@itas.vn .
  • //ParameterParser.java.....615. String[] values = request.getParameterValues(name); www.itas.vn info@itas.vn .
  • ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);87. protected Element injectableQuery(WebSession s) //SqlNumericInjection.java ..... 98. station = s.getParser().getRawParameter(STATION_ID, null); ..... 106. query = "SELECT * FROM weather_data WHERE station = " + station; ..... 109. ec.addElement(new PRE(query));Path 41:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);198. protected Element makeAccountLine(WebSession s) //SqlStringInjection.java ..... 203. accountName = s.getParser().getRawParameter(ACCT_NAME, "Your Name");84. protected Element injectableQuery(WebSession s) //SqlStringInjection.java ..... 92. ec.addElement(makeAccountLine(s)); ..... 94. String query = "SELECT * FROM user_data WHERE last_name = " + accountName + ""; 95. ec.addElement(new PRE(query));Path 42:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name); www.itas.vn info@itas.vn .
  • 155. protected Element makeAccountLine(WebSession s) //WsSqlInjection.java ..... 161. accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101");171. protected Element createContent(WebSession s) //WsSqlInjection.java ..... 176. ec.addElement(makeAccountLine(s)); ..... 178. String query = "SELECT * FROM user_data WHERE userid = " + accountNumber; 179. ec.addElement(new PRE(query));Path 43:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 98. tr.addElement(new TD(rs.getString("userid")));Path 44:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java www.itas.vn info@itas.vn .
  • ..... www.itas.vn info@itas.vn .
  • 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 99. tr.addElement(new TD(rs.getString("password")));Path 45:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 100. tr.addElement(new TD(rs.getString("ssn")));Path 46:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java www.itas.vn info@itas.vn .
  • ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 101. tr.addElement(new TD(rs.getString("salary")));Path 47:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);123. protected Element concept1(WebSession s) throws Exception //BackDoors.java ..... 131. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 134. userInput = SELECT_ST + userInput; 135. String[] arrSQL = userInput.split(";"); ..... 148. ResultSet rs = statement.executeQuery(arrSQL[0]); 149. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 102. tr.addElement(new TD(rs.getString("email"))); www.itas.vn info@itas.vn .
  • www.itas.vn info@itas.vn .
  • Path 48:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 86. if (rs.next()) ..... 98. tr.addElement(new TD(rs.getString("userid"))); ..... 101. tr.addElement(new TD(rs.getString("salary"))); 102. tr.addElement(new TD(rs.getString("email"))); ..... 107. tr.addElement(new TD(rs.getString("userid")));Path 49:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java www.itas.vn info@itas.vn .
  • .....164. String userInput = s.getParser().getRawParameter(USERNAME, "");..... www.itas.vn info@itas.vn .
  • 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 86. if (rs.next()) ..... 98. tr.addElement(new TD(rs.getString("userid"))); ..... 101. tr.addElement(new TD(rs.getString("salary"))); 102. tr.addElement(new TD(rs.getString("email"))); ..... 108. tr.addElement(new TD(rs.getString("password")));Path 50:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);123. protected Element concept1(WebSession s) throws Exception //BackDoors.java ..... 131. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 134. userInput = SELECT_ST + userInput; 135. String[] arrSQL = userInput.split(";"); ..... 148. ResultSet rs = statement.executeQuery(arrSQL[0]); 149. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 99. tr.addElement(new TD(rs.getString("password"))); 100. tr.addElement(new TD(rs.getString("ssn"))); ..... 104. while (rs.next()) ..... www.itas.vn info@itas.vn .
  • 109. tr.addElement(new TD(rs.getString("ssn")));Path 51:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 86. if (rs.next()) ..... 98. tr.addElement(new TD(rs.getString("userid"))); ..... 101. tr.addElement(new TD(rs.getString("salary"))); 102. tr.addElement(new TD(rs.getString("email"))); ..... 107. tr.addElement(new TD(rs.getString("userid"))); 108. tr.addElement(new TD(rs.getString("password"))); ..... 110. tr.addElement(new TD(rs.getString("salary"))); 111. tr.addElement(new TD(rs.getString("email")));Path 52:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); www.itas.vn info@itas.vn .
  • ..... www.itas.vn info@itas.vn .
  • 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);64. protected Element createContent(WebSession s) //LogSpoofing.java ..... 96. inputUsername = new String(s.getParser().getRawParameter(USERNAME, "")); ..... 99. inputUsername = URLDecoder.decode(inputUsername, "UTF-8"); ..... 106. row4.addElement(new TD(new PRE(WebGoatI18N.get("LoginFailedForUserName")+": " + inputUsername))).setBgColor(HtmlColor.GRAY);Path 53:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);87. protected Element createContent(WebSession s) //Phishing.java ..... 93. searchText = s.getParser().getRawParameter(SEARCH, ""); ..... 97. ec.addElement(makeSearch(s));110. protected Element makeSearch(WebSession s) //Phishing.java ..... 137. Input input1 = new Input(Input.TEXT, SEARCH, searchText); 138. row1.addElement(new TD(input1).setAlign("left"));Path 54:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name); www.itas.vn info@itas.vn .
  • 80. protected Element createContent(WebSession s) //SessionFixation.java ..... www.itas.vn info@itas.vn .
  • 144. String mailContent = s.getParser().getRawParameter(MAILCONTENTNAME, ""); ..... 147. s.add(MAILCONTENTNAME, mailContent);251. public void add(String key, Object value) //WebSession.java ..... 253. session.put(key, value);80. protected Element createContent(WebSession s) //SessionFixation.java ..... 147. s.add(MAILCONTENTNAME, mailContent); ..... 155. return super.createStagedContent(s);61. protected Element createStagedContent(WebSession s) //SequentialLessonAdapter.java ..... 76. return (doStage3(s));200. protected Element doStage3(WebSession s) throws Exception //SessionFixation.java ..... 202. return createStage3Content(s);224. private Element createStage3Content(WebSession s) //SessionFixation.java ..... 227. return createMainLoginContent(s);330. protected Element createMainLoginContent(WebSession s) //SessionFixation.java ..... 374. workspaceDiv.addElement(createWorkspaceContent(s));392. private Element createWorkspaceContent(WebSession s) //SessionFixation.java ..... 395. String name = s.getParser().getStringParameter(USER, ""); 396. String password = s.getParser().getStringParameter(PASSWORD, ""); ..... 414. else if (sid.equals(s.get("SID")) && s.get(LOGGEDIN).equals("true")) ..... 417. createSuccessfulLoginContent(s, ec);553. private void createSuccessfulLoginContent(WebSession s, ElementContainer ec) //SessionFixation.java ..... 570. tr1.addElement(new TD(getLoggedInUser(s)));671. private String getLoggedInUser(WebSession s) //SessionFixation.java ..... 675. String user = (String) s.get(LOGGEDINUSER);288. public Object get(String key) //WebSession.java ..... 290. return (session.get(key));671. private String getLoggedInUser(WebSession s) //SessionFixation.java ..... 675. String user = (String) s.get(LOGGEDINUSER); www.itas.vn info@itas.vn .
  • 676. return user; www.itas.vn info@itas.vn .
  • 553. private void createSuccessfulLoginContent(WebSession s, ElementContainer ec) //SessionFixation.java ..... 570. tr1.addElement(new TD(getLoggedInUser(s)));Path 55:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);77. protected Element createContent(WebSession s) //DOS_Login.java ..... 86. password = s.getParser().getRawParameter(PASSWORD); ..... 99. + password + ""; ..... 106. ResultSet results = statement.executeQuery(query); ..... 111. ec.addElement(DatabaseUtilities.writeTable(results, resultsMetaData));130. public static MultiPartElement writeTable(ResultSet results, ResultSetMetaData resultsMetaData) throws IOException, //DatabaseUtilities.java ..... 157. String str = results.getString(i); ..... 159. row.addElement(new TD(str.replaceAll(" ", "&nbsp;")));Path 56:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //CommandInjection.java ..... 71. String helpFile = s.getParser().getRawParameter(HELP_FILE, "BasicAuthentication.help"); ..... 129. + (helpFile.toString().length() == 0 ? "&lt;"+WebGoatI18N.get("SelectFileFromListBelow")+"&gt;" : helpFile.toString()) www.itas.vn info@itas.vn .
  • Path 57:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);140. protected Element doTransfer(WebSession s) { //CSRF.java 141. String transferFunds = HtmlEncoder.encode(s.getParser().getRawParameter(TRANSFER_FUNDS_PARAMETER, ""));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();140. protected Element doTransfer(WebSession s) { //CSRF.java 141. String transferFunds = HtmlEncoder.encode(s.getParser().getRawParameter(TRANSFER_FUNDS_PARAMETER, "")); ..... 159. ec.addElement(new StringElement("Amount Transfered: "+transferFunds));Path 58:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);77. protected Element createContent(WebSession s) //DOS_Login.java ..... 86. password = s.getParser().getRawParameter(PASSWORD); ..... 99. + password + ""; 100. ec.addElement(new StringElement(query));Path 59:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High www.itas.vn info@itas.vn .
  • 613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);87. protected Element createContent(WebSession s) //Phishing.java ..... 93. searchText = s.getParser().getRawParameter(SEARCH, ""); ..... 97. ec.addElement(makeSearch(s));110. protected Element makeSearch(WebSession s) //Phishing.java ..... 150. ec.addElement(new StringElement("Results for: " + searchText));Path 60:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage); www.itas.vn info@itas.vn .
  • 148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 155. ec.addElement(new StringElement("<b>MAIL FROM:</b> " + www.itas.vn info@itas.vn .
  • Arrays.asList(sentMessage.getReplyTo())));Path 61:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 157. ec.addElement(new StringElement("<b>RCPT TO:</b> " + Arrays.asList(sentMessage.getAllRecipients())));Path 62:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name); www.itas.vn info@itas.vn .
  • 94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... www.itas.vn info@itas.vn .
  • 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 161. + Arrays.asList(sentMessage.getHeader("Message-ID"))));Path 63:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage); www.itas.vn info@itas.vn .
  • 148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 163. ec.addElement(new StringElement("<b>Date:</b> " + sentMessage.getSentDate()));Path 64:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 165. ec.addElement(new StringElement("<b>Subject:</b> " + sentMessage.getSubject()));Path 65:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name); www.itas.vn info@itas.vn .
  • 94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 199. ec.addElement(new StringElement("<b>Delivered-To:</b> " + to));Path 66:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 203. ec.addElement(new StringElement("for &lt;" + to + "&gt;; " + today));Path 67:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 125. sendSimulatedMail(ec, to, subject, message); www.itas.vn info@itas.vn .
  • 186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 205. ec.addElement(new StringElement("<b>To:</b> " + to));Path 68:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 209. ec.addElement(new StringElement("<b>Subject:</b> " + subject));Path 69:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 212. ec.addElement(new StringElement(message)); www.itas.vn info@itas.vn .
  • www.itas.vn info@itas.vn .
  • Path 70:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 112. createMailMessage(s, subject, message, ec);220. private void createMailMessage(WebSession s, String subject, String message, ElementContainer ec) //UncheckedEmail.java ..... 275. ta.addElement(new StringElement(convertMetachars(message)));275. protected static String convertMetachars(String token) //Screen.java ..... 290. String replacedString = token; ..... 293. replacedString = replacedString.replaceAll(metaChar[mci], htmlCode[mci]); ..... 295. return (replacedString);220. private void createMailMessage(WebSession s, String subject, String message, ElementContainer ec) //UncheckedEmail.java ..... 275. ta.addElement(new StringElement(convertMetachars(message)));Path 71:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);69. protected Element createContent(WebSession s) //ReportCardScreen.java ..... 79. user = s.getParser().getRawParameter(USERNAME); ..... 95. ec.addElement(makeReportCard(s, user));207. public Element makeReportCard(WebSession s, String user) //ReportCardScreen.java ..... www.itas.vn info@itas.vn .
  • 211. ec.addElement(makeUser(s, user)); www.itas.vn info@itas.vn .
  • 267. protected Element makeUser(WebSession s, String user) //ReportCardScreen.java ..... 274. h2.addElement(new StringElement("Results for: " + user + type));Path 72:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 262. t.addElement(makeRow(description, urlEncode(userInput), urlDecode(userInput)));745. public static String urlDecode(String str) //Encoding.java ..... 749. return (URLDecoder.decode(str, "UTF-8"));175. protected Element createContent(WebSession s) //Encoding.java ..... 262. t.addElement(makeRow(description, urlEncode(userInput), urlDecode(userInput)));604. private TR makeRow(String description, String value1, String value2) //Encoding.java ..... 612. .addElement(new Div().addElement(value2).setStyle("overflow:auto; height:60px; width:100px;")) 613. .setBgColor("#dddddd");Path 73:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... www.itas.vn info@itas.vn .
  • 108. String param1 = s.getParser().getRawParameter("field1", "abc");..... www.itas.vn info@itas.vn .
  • 116. TextArea input1 = new TextArea("field1", 1, 25).addElement(param1);Path 74:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 109. String param2 = s.getParser().getRawParameter("field2", "123"); ..... 117. TextArea input2 = new TextArea("field2", 1, 25).addElement(param2);Path 75:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 110. String param3 = s.getParser().getRawParameter("field3", "abc 123 ABC"); ..... 118. TextArea input3 = new TextArea("field3", 1, 25).addElement(param3);Path 76:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]); www.itas.vn info@itas.vn .
  • 593. public String getRawParameter(String name, String def) //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 111. String param4 = s.getParser().getRawParameter("field4", "seven"); ..... 119. TextArea input4 = new TextArea("field4", 1, 25).addElement(param4);Path 77:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 112. String param5 = s.getParser().getRawParameter("field5", "90210"); ..... 120. TextArea input5 = new TextArea("field5", 1, 25).addElement(param5);Path 78:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 113. String param6 = s.getParser().getRawParameter("field6", "90210-1111"); ..... 121. TextArea input6 = new TextArea("field6", 1, 25).addElement(param6);Path 79:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException www.itas.vn info@itas.vn .
  • //ParameterParser.java.....615. String[] values = request.getParameterValues(name); www.itas.vn info@itas.vn .
  • ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 114. String param7 = s.getParser().getRawParameter("field7", "301-604-4882"); ..... 122. TextArea input7 = new TextArea("field7", 1, 25).addElement(param7);Path 80:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 228. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 81:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException www.itas.vn info@itas.vn .
  • //ParameterParser.java.....615. String[] values = request.getParameterValues(name); www.itas.vn info@itas.vn .
  • ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 204. tr.addElement(new TD().addElement(String.valueOf(quantity1)).setAlign("center"));Path 82:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... www.itas.vn info@itas.vn .
  • 149. String entity = i2e.get(new Integer((int) ch));..... www.itas.vn info@itas.vn .
  • 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 204. tr.addElement(new TD().addElement(String.valueOf(quantity1)).setAlign("center")); ..... 215. tr.addElement(new TD().addElement(String.valueOf(quantity2)).setAlign("center"));Path 83:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 204. tr.addElement(new TD().addElement(String.valueOf(quantity1)).setAlign("center")); ..... 215. tr.addElement(new www.itas.vn info@itas.vn .
  • TD().addElement(String.valueOf(quantity2)).setAlign("center"));..... www.itas.vn info@itas.vn .
  • 237. tr.addElement(new TD().addElement(String.valueOf(quantity4)).setAlign("center"));Path 84:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 270. tr.addElement(new TD().addElement(new Input(Input.TEXT, "CC", param2)).setAlign("right"));Path 85:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name); www.itas.vn info@itas.vn .
  • 160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 172. String param1 = s.getParser().getRawParameter("PAC", "111"); ..... 276. tr.addElement(new TD().addElement(new Input(Input.TEXT, "PAC", param1)).setAlign("right"));Path 86:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 193. Input input = new Input(Input.TEXT, INPUT, userInput); ..... 195. tr.addElement(new TD().addElement(input));Path 87:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 270. t.addElement(makeRow(description, rot13(userInput), rot13(userInput)));658. public static synchronized String rot13(String input) //Encoding.java ..... 665. char inChar = input.charAt(i); ..... www.itas.vn info@itas.vn .
  • 668. inChar += 13;..... www.itas.vn info@itas.vn .
  • 671. inChar -= 26; ..... 682. output.append(inChar); ..... 685. return output.toString();175. protected Element createContent(WebSession s) //Encoding.java ..... 270. t.addElement(makeRow(description, rot13(userInput), rot13(userInput)));604. private TR makeRow(String description, String value1, String value2) //Encoding.java ..... 609. .addElement(new Div().addElement(value1).setStyle("overflow:auto; height:60px; width:100px;"))Path 88:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 262. t.addElement(makeRow(description, urlEncode(userInput), urlDecode(userInput)));745. public static String urlDecode(String str) //Encoding.java ..... 749. return (URLDecoder.decode(str, "UTF-8"));175. protected Element createContent(WebSession s) //Encoding.java ..... 262. t.addElement(makeRow(description, urlEncode(userInput), urlDecode(userInput)));604. private TR makeRow(String description, String value1, String value2) //Encoding.java ..... 612. .addElement(new Div().addElement(value2).setStyle("overflow:auto; height:60px; width:100px;"))Path 89:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 615. String[] values = request.getParameterValues(name);..... www.itas.vn info@itas.vn .
  • 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 108. String param1 = s.getParser().getRawParameter("field1", "abc"); ..... 116. TextArea input1 = new TextArea("field1", 1, 25).addElement(param1); ..... 130. ec.addElement(new Div().addElement(input1));Path 90:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 109. String param2 = s.getParser().getRawParameter("field2", "123"); ..... 117. TextArea input2 = new TextArea("field2", 1, 25).addElement(param2); ..... 133. ec.addElement(new Div().addElement(input2));Path 91:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 110. String param3 = s.getParser().getRawParameter("field3", "abc 123 ABC"); ..... www.itas.vn info@itas.vn .
  • 118. TextArea input3 = new TextArea("field3", 1, 25).addElement(param3);..... www.itas.vn info@itas.vn .
  • 137. ec.addElement(new Div().addElement(input3));Path 92:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 111. String param4 = s.getParser().getRawParameter("field4", "seven"); ..... 119. TextArea input4 = new TextArea("field4", 1, 25).addElement(param4); ..... 140. ec.addElement(new Div().addElement(input4));Path 93:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 112. String param5 = s.getParser().getRawParameter("field5", "90210"); ..... 120. TextArea input5 = new TextArea("field5", 1, 25).addElement(param5); ..... 143. ec.addElement(new Div().addElement(input5));Path 94:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java www.itas.vn info@itas.vn .
  • .....615. String[] values = request.getParameterValues(name);..... www.itas.vn info@itas.vn .
  • 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 113. String param6 = s.getParser().getRawParameter("field6", "90210-1111"); ..... 121. TextArea input6 = new TextArea("field6", 1, 25).addElement(param6); ..... 147. ec.addElement(new Div().addElement(input6));Path 95:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 114. String param7 = s.getParser().getRawParameter("field7", "301-604-4882"); ..... 122. TextArea input7 = new TextArea("field7", 1, 25).addElement(param7); ..... 151. ec.addElement(new Div().addElement(input7));Path 96:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 76. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 www.itas.vn info@itas.vn .
  • 3214 0002 1999")); www.itas.vn info@itas.vn .
  • 140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 76. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 183. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 97:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 75. String param1 = s.getParser().getRawParameter("field1", "111"); ..... 187. tr.addElement(new TD().addElement("<input name=field1 type=TEXT value=" + param1 + ">"));Path 98:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... www.itas.vn info@itas.vn .
  • 75. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 www.itas.vn info@itas.vn .
  • 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();65. protected Element createContent(WebSession s) //TraceXSS.java ..... 75. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 180. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 99:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 74. String param1 = s.getParser().getRawParameter("field1", "111"); ..... 184. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field1", param1)));Path 100:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name); www.itas.vn info@itas.vn .
  • 94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); www.itas.vn info@itas.vn .
  • ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 153. + Arrays.asList(sentMessage.getAllRecipients()))));Path 101:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 195. ec.addElement(new Center().addElement(new B().addElement("You sent the following message to: " + to)));Path 102:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... www.itas.vn info@itas.vn .
  • 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 112. createMailMessage(s, subject, message, ec);220. private void createMailMessage(WebSession s, String subject, String message, ElementContainer ec) //UncheckedEmail.java ..... 275. ta.addElement(new StringElement(convertMetachars(message)));275. protected static String convertMetachars(String token) //Screen.java ..... 290. String replacedString = token; ..... 293. replacedString = replacedString.replaceAll(metaChar[mci], htmlCode[mci]); ..... 295. return (replacedString);220. private void createMailMessage(WebSession s, String subject, String message, ElementContainer ec) //UncheckedEmail.java ..... 275. ta.addElement(new StringElement(convertMetachars(message))); 276. tr.addElement(new TD().setAlign("LEFT").addElement(ta).setColSpan(2));Path 103:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);81. protected Element createContent(WebSession s) //XPATHInjection.java ..... 124. String username = s.getParser().getRawParameter(USERNAME, ""); ..... 143. String expression = "/employees/employee[loginID/text()=" + username + " and passwd/text()=" + password ..... 145. nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET); ..... www.itas.vn info@itas.vn .
  • 162. Node node = nodes.item(i);163. String[] arrTokens = node.getTextContent().split("[tsn]+"); www.itas.vn info@itas.vn .
  • ..... 166. tr.addElement(new TD().addElement(arrTokens[1]));Path 104:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);81. protected Element createContent(WebSession s) //XPATHInjection.java ..... 124. String username = s.getParser().getRawParameter(USERNAME, ""); ..... 143. String expression = "/employees/employee[loginID/text()=" + username + " and passwd/text()=" + password ..... 145. nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET); ..... 162. Node node = nodes.item(i); 163. String[] arrTokens = node.getTextContent().split("[tsn]+"); ..... 167. tr.addElement(new TD().addElement(arrTokens[2]));Path 105:Query Name - Reflected XSS All ClientsSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);81. protected Element createContent(WebSession s) //XPATHInjection.java ..... 124. String username = s.getParser().getRawParameter(USERNAME, ""); ..... 143. String expression = "/employees/employee[loginID/text()=" + username + " and passwd/text()=" + password ..... www.itas.vn info@itas.vn .
  • 145. nodes = (NodeList) xPath.evaluate(expression, inputSource,XPathConstants.NODESET); www.itas.vn info@itas.vn .
  • ..... 162. Node node = nodes.item(i); 163. String[] arrTokens = node.getTextContent().split("[tsn]+"); ..... 168. tr.addElement(new TD().addElement(arrTokens[4]));Path 106:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 208. .getStringParameter("SUBTOT", "$0.00")).setReadOnly(true)Path 107:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... www.itas.vn info@itas.vn .
  • 79. clean.append(c);..... www.itas.vn info@itas.vn .
  • 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 217. .getStringParameter("GRANDTOT", "$0.00")).setReadOnly(true)Path 108:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);261. protected ElementContainer createQtyTable(WebSession s) //ClientSideValidation.java ..... 283. new Input(Input.TEXT, "PRC1", s.getParser().getStringParameter("PRC1",Path 109:Query Name - Reflected XSS All ClientsSeverity - High www.itas.vn info@itas.vn .
  • 672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);261. protected ElementContainer createQtyTable(WebSession s) //ClientSideValidation.java ..... 288. Input input = new Input(Input.TEXT, "QTY1", s.getParser().getStringParameter("QTY1", "0"));Path 110:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java www.itas.vn info@itas.vn .
  • .....714. return getStringParameter(name); www.itas.vn info@itas.vn .
  • 261. protected ElementContainer createQtyTable(WebSession s) //ClientSideValidation.java ..... 297. new Input(Input.TEXT, "TOT1", s.getParser().getStringParameter("TOT1",Path 111:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);261. protected ElementContainer createQtyTable(WebSession s) //ClientSideValidation.java ..... 307. new Input(Input.TEXT, "PRC2", s.getParser().getStringParameter("PRC2",Path 112:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... www.itas.vn info@itas.vn .
  • 87. return (clean.toString()); www.itas.vn info@itas.vn .
  • 672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);261. protected ElementContainer createQtyTable(WebSession s) //ClientSideValidation.java ..... 312. input = new Input(Input.TEXT, "QTY2", s.getParser().getStringParameter("QTY2", "0"));Path 113:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);261. protected ElementContainer createQtyTable(WebSession s) //ClientSideValidation.java ..... 319. new Input(Input.TEXT, "TOT2", s.getParser().getStringParameter("TOT2",Path 114:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 674. String[] values = request.getParameterValues(name);..... www.itas.vn info@itas.vn .
  • 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);261. protected ElementContainer createQtyTable(WebSession s) //ClientSideValidation.java ..... 330. new Input(Input.TEXT, "PRC3", s.getParser().getStringParameter("PRC3", "$1599.99"))Path 115:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name); www.itas.vn info@itas.vn .
  • 261. protected ElementContainer createQtyTable(WebSession s) //ClientSideValidation.java ..... www.itas.vn info@itas.vn .
  • 333. input = new Input(Input.TEXT, "QTY3", s.getParser().getStringParameter("QTY3", "0"));Path 116:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);261. protected ElementContainer createQtyTable(WebSession s) //ClientSideValidation.java ..... 340. new Input(Input.TEXT, "TOT3", s.getParser().getStringParameter("TOT3",Path 117:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString()); www.itas.vn info@itas.vn .
  • 672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java www.itas.vn info@itas.vn .
  • ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);261. protected ElementContainer createQtyTable(WebSession s) //ClientSideValidation.java ..... 350. new Input(Input.TEXT, "PRC4", s.getParser().getStringParameter("PRC4",Path 118:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);261. protected ElementContainer createQtyTable(WebSession s) //ClientSideValidation.java ..... 355. input = new Input(Input.TEXT, "QTY4", s.getParser().getStringParameter("QTY4", "0"));Path 119:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... www.itas.vn info@itas.vn .
  • 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);261. protected ElementContainer createQtyTable(WebSession s) //ClientSideValidation.java ..... 362. new Input(Input.TEXT, "TOT4", s.getParser().getStringParameter("TOT4",Path 120:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name); www.itas.vn info@itas.vn .
  • 71. protected Element createContent(WebSession s) //DangerousEval.java ..... 110. tr.addElement(new TD().addElement(new Input(Input.TEXT, "QTY1", www.itas.vn info@itas.vn .
  • s.getParser().getStringParameter("QTY1", "1"))).setAlign("right"));Path 121:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);71. protected Element createContent(WebSession s) //DangerousEval.java ..... 119. tr.addElement(new TD().addElement(new Input(Input.TEXT, "QTY2", s.getParser().getStringParameter("QTY2", "1"))).setAlign("right"));Path 122:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString()); www.itas.vn info@itas.vn .
  • 672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java www.itas.vn info@itas.vn .
  • ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);71. protected Element createContent(WebSession s) //DangerousEval.java ..... 128. tr.addElement(new TD().addElement(new Input(Input.TEXT, "QTY3", s.getParser().getStringParameter("QTY3", "1"))).setAlign("right"));Path 123:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);71. protected Element createContent(WebSession s) //DangerousEval.java ..... 138. tr.addElement(new TD().addElement(new Input(Input.TEXT, "QTY4", s.getParser().getStringParameter("QTY4", "1"))).setAlign("right"));Path 124:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); www.itas.vn info@itas.vn .
  • ..... www.itas.vn info@itas.vn .
  • 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 185. String userKey = s.getParser().getStringParameter(KEY, ""); ..... 203. Input key = new Input(Input.TEXT, KEY, userKey);Path 125:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 714. return getStringParameter(name); www.itas.vn info@itas.vn .
  • 211. private Element createWorkspaceContent(WebSession s) //MultiLevelLogin2.java ..... 214. user = s.getParser().getStringParameter(USER, ""); ..... 276. createAskForTanContent(s, ec, getCurrentTanPosition(s), user);354. private void createAskForTanContent(WebSession s, ElementContainer ec, int tanNr, String user) //MultiLevelLogin2.java ..... 381. ec.addElement(new Input(Input.HIDDEN, HIDDEN_USER, user));Path 126:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 116. new Input(Input.TEXT, "QTY1", s.getParser().getStringParameter("QTY1",Path 127:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim()); www.itas.vn info@itas.vn .
  • 69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); www.itas.vn info@itas.vn .
  • ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 128. new Input(Input.TEXT, "QTY2", s.getParser().getStringParameter("QTY2",Path 128:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 140. new Input(Input.TEXT, "QTY3", s.getParser().getStringParameter("QTY3", www.itas.vn info@itas.vn .
  • Path 129:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 153. new Input(Input.TEXT, "QTY4", s.getParser().getStringParameter("QTY4",Path 130:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... www.itas.vn info@itas.vn .
  • 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 113. new Input(Input.TEXT, "QTY1", s.getParser().getStringParameter("QTY1",Path 131:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 125. new Input(Input.TEXT, "QTY2", s.getParser().getStringParameter("QTY2",Path 132:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim()); www.itas.vn info@itas.vn .
  • 69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... www.itas.vn info@itas.vn .
  • 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 137. new Input(Input.TEXT, "QTY3", s.getParser().getStringParameter("QTY3",Path 133:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 150. new Input(Input.TEXT, "QTY4", s.getParser().getStringParameter("QTY4", www.itas.vn info@itas.vn .
  • Path 134:Query Name - Reflected XSS All ClientsSeverity - High www.itas.vn info@itas.vn .
  • 672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);79. protected Element createMainContent(WebSession s) //InsecureLogin.java ..... 105. String user = s.getParser().getStringParameter(USER, ""); ..... 109. workspaceDiv.addElement(createSuccessfulLoginContent(s, user));292. private Element createSuccessfulLoginContent(WebSession s, String user) //InsecureLogin.java ..... 311. tr1.addElement(new TD(user));Path 135:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString()); www.itas.vn info@itas.vn .
  • 672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);211. private Element createWorkspaceContent(WebSession s) //MultiLevelLogin2.java ..... 220. hiddenUser = s.getParser().getStringParameter(HIDDEN_USER, ""); ..... 265. createSuccessfulLoginContent(s, ec, hiddenUser);404. private void createSuccessfulLoginContent(WebSession s, ElementContainer ec, String user) //MultiLevelLogin2.java ..... 422. tr1.addElement(new TD(user));Path 136:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);224. protected Element createContent(WebSession s) //ForgotPassword.java ..... 244. color = s.getParser().getStringParameter(COLOR, ""); ..... 249. COLOR_RESPONSE = color; 250. ec.addElement(doStage3(s)); www.itas.vn info@itas.vn .
  • 170. protected Element doStage3(WebSession s) //ForgotPassword.java ..... 197. tr.addElement(new TD().addElement(new StringElement("Color: " + COLOR_RESPONSE)));Path 137:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);71. protected Element createContent(WebSession s) //DangerousEval.java ..... 110. tr.addElement(new TD().addElement(new Input(Input.TEXT, "QTY1", s.getParser().getStringParameter("QTY1", "1"))).setAlign("right"));Path 138:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... www.itas.vn info@itas.vn .
  • 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);71. protected Element createContent(WebSession s) //DangerousEval.java ..... 119. tr.addElement(new TD().addElement(new Input(Input.TEXT, "QTY2", s.getParser().getStringParameter("QTY2", "1"))).setAlign("right"));Path 139:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);71. protected Element createContent(WebSession s) //DangerousEval.java ..... 128. tr.addElement(new TD().addElement(new Input(Input.TEXT, "QTY3", s.getParser().getStringParameter("QTY3", "1"))).setAlign("right"));Path 140:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java www.itas.vn info@itas.vn .
  • ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);71. protected Element createContent(WebSession s) //DangerousEval.java ..... 138. tr.addElement(new TD().addElement(new Input(Input.TEXT, "QTY4", s.getParser().getStringParameter("QTY4", "1"))).setAlign("right"));Path 141:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value; www.itas.vn info@itas.vn .
  • 710. public String getStringParameter(String name, String def) //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 714. return getStringParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 185. String userKey = s.getParser().getStringParameter(KEY, ""); ..... 203. Input key = new Input(Input.TEXT, KEY, userKey); ..... 205. tr.addElement(new TD().addElement(key));Path 142:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);224. protected Element createContent(WebSession s) //ForgotPassword.java ..... 244. color = s.getParser().getStringParameter(COLOR, ""); ..... 249. COLOR_RESPONSE = color; 250. ec.addElement(doStage3(s));170. protected Element doStage3(WebSession s) //ForgotPassword.java ..... 197. tr.addElement(new TD().addElement(new StringElement("Color: " + COLOR_RESPONSE)));Path 143: www.itas.vn info@itas.vn .
  • Query Name - Reflected XSS All ClientsSeverity - High www.itas.vn info@itas.vn .
  • 672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 113. new Input(Input.TEXT, "QTY1", s.getParser().getStringParameter("QTY1",Path 144:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value; www.itas.vn info@itas.vn .
  • 710. public String getStringParameter(String name, String def) //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 714. return getStringParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 125. new Input(Input.TEXT, "QTY2", s.getParser().getStringParameter("QTY2",Path 145:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 137. new Input(Input.TEXT, "QTY3", s.getParser().getStringParameter("QTY3",Path 146:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); www.itas.vn info@itas.vn .
  • ..... www.itas.vn info@itas.vn .
  • 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 150. new Input(Input.TEXT, "QTY4", s.getParser().getStringParameter("QTY4",Path 147:Query Name - Reflected XSS All ClientsSeverity - High787. protected String getCookie(WebSession s) //Challenge2Screen.java ..... 789. Cookie[] cookies = s.getRequest().getCookies(); ..... 793. if (cookies[i].getName().equalsIgnoreCase(USER_COOKIE)) { return (cookies[i].getValue()); }189. protected Element doStage2(WebSession s) throws Exception //Challenge2Screen.java ..... 212. String user = Encoding.base64Decode(getCookie(s));99. public static String base64Decode(String str) throws IOException //Encoding.java ..... 102. byte[] b = decoder.decodeBuffer(str); ..... 104. return (new String(b));189. protected Element doStage2(WebSession s) throws Exception //Challenge2Screen.java ..... 212. String user = Encoding.base64Decode(getCookie(s)); ..... 249. Input input = new Input(Input.HIDDEN, USER, user);Path 148:Query Name - Reflected XSS All ClientsSeverity - High267. public void eatCookies() //WebSession.java ..... 269. Cookie[] cookies = request.getCookies(); ..... 276. response.addCookie(cookies[loop]); www.itas.vn info@itas.vn .
  • Path 149:Query Name - Reflected XSS All ClientsSeverity - High481. public List<Cookie> getCookies() //WebSession.java ..... 485. if (showCookies()) cookies = Arrays.asList(request.getCookies()); ..... 495. return cookies;1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //main.jsp ..... 244. Iterator i = webSession.getCookies().iterator(); ..... 247. Cookie c = (Cookie) i.next(); 248. printCookies = "<div id="cookie" class="info">" + c.getName() + " <img src="images/icons/rightArrow.jpg" alt=""> " + c.getValue() + "</div><br>"; 249. out.println(printCookies);Path 150:Query Name - Reflected XSS All ClientsSeverity - High505. public String getCookie(String cookieName) //WebSession.java ..... 507. Cookie[] cookies = getRequest().getCookies(); ..... 511. if (cookies[i].getName().equalsIgnoreCase(cookieName)) { return (cookies[i].getValue()); }190. protected Element makeLogin(WebSession s) //WeakSessionID.java ..... 194. String weakid = s.getCookie(SESSIONID); ..... 251. Input input3 = new Input(Input.HIDDEN, SESSIONID, weakid);Path 151:Query Name - Reflected XSS All ClientsSeverity - High123. protected Element concept1(WebSession s) throws Exception //BackDoors.java ..... 131. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 134. userInput = SELECT_ST + userInput; 135. String[] arrSQL = userInput.split(";"); ..... 148. ResultSet rs = statement.executeQuery(arrSQL[0]); 149. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 99. tr.addElement(new TD(rs.getString("password"))); 100. tr.addElement(new TD(rs.getString("ssn"))); ..... www.itas.vn info@itas.vn .
  • 104. while (rs.next())..... www.itas.vn info@itas.vn .
  • 109. tr.addElement(new TD(rs.getString("ssn"))); 110. tr.addElement(new TD(rs.getString("salary")));Path 152:Query Name - Reflected XSS All ClientsSeverity - High186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 191. String param1 = s.getParser().getRawParameter("field1", ""); ..... 233. Input input = new Input(Input.TEXT, "field1", param1); 234. input.setOnKeyUp("isValidCoupon(field1.value)"); 235. tr.addElement(new TD().addElement(input));Path 153:Query Name - Reflected XSS All ClientsSeverity - High160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 204. tr.addElement(new TD().addElement(String.valueOf(quantity1)).setAlign("center")); ..... 226. tr.addElement(new TD().addElement(String.valueOf(quantity3)).setAlign("center"));Path 154:Query Name - Reflected XSS All ClientsSeverity - High72. protected Element doTransfer(WebSession s) { //CsrfTokenByPass.java 73. String transferFunds = HtmlEncoder.encode(s.getParser().getRawParameter(TRANSFER_FUNDS_PARAMETER, "")); www.itas.vn info@itas.vn .
  • 140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();72. protected Element doTransfer(WebSession s) { //CsrfTokenByPass.java 73. String transferFunds = HtmlEncoder.encode(s.getParser().getRawParameter(TRANSFER_FUNDS_PARAMETER, "")); ..... 109. ec.addElement(new StringElement("Amount Transfered: "+transferFunds));Path 155:Query Name - Reflected XSS All ClientsSeverity - High175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 270. t.addElement(makeRow(description, rot13(userInput), rot13(userInput)));658. public static synchronized String rot13(String input) //Encoding.java ..... 665. char inChar = input.charAt(i); ..... 668. inChar += 13; ..... 671. inChar -= 26; ..... 682. output.append(inChar); ..... 685. return output.toString();175. protected Element createContent(WebSession s) //Encoding.java ..... 270. t.addElement(makeRow(description, rot13(userInput), rot13(userInput)));604. private TR makeRow(String description, String value1, String value2) //Encoding.java ..... 609. .addElement(new Div().addElement(value1).setStyle("overflow:auto; height:60px; width:100px;")) 610. .setBgColor("#dddddd");Path 156:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... www.itas.vn info@itas.vn .
  • 100. String to = s.getParser().getRawParameter(HIDDEN_TO, "");..... www.itas.vn info@itas.vn .
  • 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 362. addressTo[0] = new InternetAddress(recipients); ..... 364. msg.setRecipients(Message.RecipientType.TO, addressTo); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 165. ec.addElement(new StringElement("<b>Subject:</b> " + sentMessage.getSubject())); ..... 170. ec.addElement(new StringElement(sentMessage.getContent().toString()));Path 157:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page language="java" contentType="text/html; charset=ISO-8859-1" import="java.util.regex.*" import="org.owasp.webgoat.lessons.DangerousEval" //eval.jsp ..... 6. String field2 = request.getParameter("field2"); ..... 34. out.write("alert(Purchase completed successfully with credit card "" + field2 + "" and access code "" + field1 + "");");Path 158:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString()); www.itas.vn info@itas.vn .
  • 672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java www.itas.vn info@itas.vn .
  • ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 185. String userKey = s.getParser().getStringParameter(KEY, ""); ..... 193. Input input = new Input(Input.TEXT, INPUT, userInput);Path 159:Query Name - Reflected XSS All ClientsSeverity - High672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 674. String[] values = request.getParameterValues(name); ..... 688. value = clean(values[0].trim());69. private String clean(String s) //ParameterParser.java ..... 75. char c = s.charAt(loop); ..... 79. clean.append(c); ..... 87. return (clean.toString());672. public String getStringParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 688. value = clean(values[0].trim()); ..... 696. return value;710. public String getStringParameter(String name, String def) //ParameterParser.java ..... 714. return getStringParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 185. String userKey = s.getParser().getStringParameter(KEY, ""); ..... 193. Input input = new Input(Input.TEXT, INPUT, userInput); ..... 195. tr.addElement(new TD().addElement(input)); www.itas.vn info@itas.vn .
  • Path 160:Query Name - Reflected XSS All ClientsSeverity - High www.itas.vn info@itas.vn .
  • 563. public Enumeration getParameterNames() //ParameterParser.java ..... 567. return request.getParameterNames();453. public List<Parameter> getParams() //WebSession.java ..... 461. Enumeration<String> e = getParser().getParameterNames(); ..... 465. String name = (String) e.nextElement(); ..... 470. params.add(new Parameter(name, values[loop]));38. public Parameter(String name, String value) //Parameter.java ..... 40. this.name = name;453. public List<Parameter> getParams() //WebSession.java ..... 470. params.add(new Parameter(name, values[loop])); ..... 478. return params;1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //main.jsp ..... 233. Iterator i = webSession.getParams().iterator(); ..... 236. Parameter p = (Parameter) i.next(); 237. printParameters = "<div id="parameter" class="info">" + p.getName() + "=" + p.getValue() + "</div><br>";44. public String getName() //Parameter.java ..... 46. return name;1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //main.jsp ..... 237. printParameters = "<div id="parameter" class="info">" + p.getName() + "=" + p.getValue() + "</div><br>"; 238. out.println(printParameters);Path 161:Query Name - Reflected XSS All ClientsSeverity - High563. public Enumeration getParameterNames() //ParameterParser.java ..... 567. return request.getParameterNames();69. protected Element createContent(WebSession s) //SummaryReportCardScreen.java ..... 79. Enumeration e = s.getParser().getParameterNames(); ..... 83. String key = (String) e.nextElement(); ..... 86. selectedUser = key.substring("View_".length()); www.itas.vn info@itas.vn .
  • ..... www.itas.vn info@itas.vn .
  • 88. return reportCard.makeReportCard(s, selectedUser);207. public Element makeReportCard(WebSession s, String user) //ReportCardScreen.java ..... 211. ec.addElement(makeUser(s, user));267. protected Element makeUser(WebSession s, String user) //ReportCardScreen.java ..... 274. h2.addElement(new StringElement("Results for: " + user + type));Path 162:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //main.jsp ..... 248. printCookies = "<div id="cookie" class="info">" + c.getName() + " <img src="images/icons/rightArrow.jpg" alt=""> " + c.getValue() + "</div><br>"; 249. out.println(printCookies);Path 163:Query Name - Reflected XSS All ClientsSeverity - High1. <%@ page contentType="text/html; charset=ISO-8859-1" language="java" //main.jsp ..... 248. printCookies = "<div id="cookie" class="info">" + c.getName() + " <img src="images/icons/rightArrow.jpg" alt=""> " + c.getValue() + "</div><br>"; 249. out.println(printCookies);Path 164:Query Name - Reflected XSS All ClientsSeverity - High787. protected String getCookie(WebSession s) //Challenge2Screen.java ..... 793. if (cookies[i].getName().equalsIgnoreCase(USER_COOKIE)) { return (cookies[i].getValue()); }189. protected Element doStage2(WebSession s) throws Exception //Challenge2Screen.java ..... 212. String user = Encoding.base64Decode(getCookie(s));99. public static String base64Decode(String str) throws IOException //Encoding.java ..... 102. byte[] b = decoder.decodeBuffer(str); ..... 104. return (new String(b));189. protected Element doStage2(WebSession s) throws Exception //Challenge2Screen.java ..... 212. String user = Encoding.base64Decode(getCookie(s)); ..... 249. Input input = new Input(Input.HIDDEN, USER, user); www.itas.vn info@itas.vn .
  • Path 165:Query Name - Reflected XSS All ClientsSeverity - High505. public String getCookie(String cookieName) //WebSession.java ..... 511. if (cookies[i].getName().equalsIgnoreCase(cookieName)) { return (cookies[i].getValue()); }190. protected Element makeLogin(WebSession s) //WeakSessionID.java ..... 194. String weakid = s.getCookie(SESSIONID); ..... 251. Input input3 = new Input(Input.HIDDEN, SESSIONID, weakid);Path 166:Query Name - Reflected XSS All ClientsSeverity - High123. protected Element concept1(WebSession s) throws Exception //BackDoors.java ..... 131. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 134. userInput = SELECT_ST + userInput; 135. String[] arrSQL = userInput.split(";"); ..... 148. ResultSet rs = statement.executeQuery(arrSQL[0]); 149. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 98. tr.addElement(new TD(rs.getString("userid")));Path 167:Query Name - Reflected XSS All ClientsSeverity - High123. protected Element concept1(WebSession s) throws Exception //BackDoors.java ..... 131. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 134. userInput = SELECT_ST + userInput; 135. String[] arrSQL = userInput.split(";"); ..... 148. ResultSet rs = statement.executeQuery(arrSQL[0]); 149. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 99. tr.addElement(new TD(rs.getString("password")));Path 168:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High123. protected Element concept1(WebSession s) throws Exception //BackDoors.java ..... www.itas.vn info@itas.vn .
  • 131. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 134. userInput = SELECT_ST + userInput; 135. String[] arrSQL = userInput.split(";"); ..... 148. ResultSet rs = statement.executeQuery(arrSQL[0]); 149. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 100. tr.addElement(new TD(rs.getString("ssn")));Path 169:Query Name - Reflected XSS All ClientsSeverity - High123. protected Element concept1(WebSession s) throws Exception //BackDoors.java ..... 131. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 134. userInput = SELECT_ST + userInput; 135. String[] arrSQL = userInput.split(";"); ..... 148. ResultSet rs = statement.executeQuery(arrSQL[0]); 149. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 101. tr.addElement(new TD(rs.getString("salary")));Path 170:Query Name - Reflected XSS All ClientsSeverity - High123. protected Element concept1(WebSession s) throws Exception //BackDoors.java ..... 131. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 134. userInput = SELECT_ST + userInput; 135. String[] arrSQL = userInput.split(";"); ..... 148. ResultSet rs = statement.executeQuery(arrSQL[0]); 149. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 102. tr.addElement(new TD(rs.getString("email")));Path 171:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High www.itas.vn info@itas.vn .
  • 123. protected Element concept1(WebSession s) throws Exception //BackDoors.java ..... 131. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 134. userInput = SELECT_ST + userInput; 135. String[] arrSQL = userInput.split(";"); ..... 148. ResultSet rs = statement.executeQuery(arrSQL[0]); 149. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 107. tr.addElement(new TD(rs.getString("userid")));Path 172:Query Name - Reflected XSS All ClientsSeverity - High123. protected Element concept1(WebSession s) throws Exception //BackDoors.java ..... 131. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 134. userInput = SELECT_ST + userInput; 135. String[] arrSQL = userInput.split(";"); ..... 148. ResultSet rs = statement.executeQuery(arrSQL[0]); 149. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 99. tr.addElement(new TD(rs.getString("password"))); 100. tr.addElement(new TD(rs.getString("ssn"))); ..... 104. while (rs.next()) ..... 109. tr.addElement(new TD(rs.getString("ssn")));Path 173:Query Name - Reflected XSS All ClientsSeverity - High123. protected Element concept1(WebSession s) throws Exception //BackDoors.java ..... 131. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 134. userInput = SELECT_ST + userInput; 135. String[] arrSQL = userInput.split(";"); ..... 148. ResultSet rs = statement.executeQuery(arrSQL[0]); 149. addDBEntriesToEC(ec, rs); www.itas.vn info@itas.vn .
  • 82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 99. tr.addElement(new TD(rs.getString("password"))); www.itas.vn info@itas.vn .
  • 100. tr.addElement(new TD(rs.getString("ssn"))); ..... 104. while (rs.next()) ..... 109. tr.addElement(new TD(rs.getString("ssn"))); ..... 111. tr.addElement(new TD(rs.getString("email")));Path 174:Query Name - Reflected XSS All ClientsSeverity - High159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 98. tr.addElement(new TD(rs.getString("userid")));Path 175:Query Name - Reflected XSS All ClientsSeverity - High159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 99. tr.addElement(new TD(rs.getString("password")));Path 176: www.itas.vn info@itas.vn .
  • Query Name - Reflected XSS All ClientsSeverity - High www.itas.vn info@itas.vn .
  • 159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 100. tr.addElement(new TD(rs.getString("ssn")));Path 177:Query Name - Reflected XSS All ClientsSeverity - High159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 101. tr.addElement(new TD(rs.getString("salary")));Path 178:Query Name - Reflected XSS All ClientsSeverity - High159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs); www.itas.vn info@itas.vn .
  • 82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... www.itas.vn info@itas.vn .
  • 102. tr.addElement(new TD(rs.getString("email")));Path 179:Query Name - Reflected XSS All ClientsSeverity - High159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 86. if (rs.next()) ..... 98. tr.addElement(new TD(rs.getString("userid"))); ..... 101. tr.addElement(new TD(rs.getString("salary"))); 102. tr.addElement(new TD(rs.getString("email"))); ..... 107. tr.addElement(new TD(rs.getString("userid"))); 108. tr.addElement(new TD(rs.getString("password")));Path 180:Query Name - Reflected XSS All ClientsSeverity - High159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 86. if (rs.next()) ..... 98. tr.addElement(new TD(rs.getString("userid"))); www.itas.vn info@itas.vn .
  • .....101. tr.addElement(new TD(rs.getString("salary"))); www.itas.vn info@itas.vn .
  • 102. tr.addElement(new TD(rs.getString("email"))); ..... 107. tr.addElement(new TD(rs.getString("userid"))); 108. tr.addElement(new TD(rs.getString("password"))); 109. tr.addElement(new TD(rs.getString("ssn")));Path 181:Query Name - Reflected XSS All ClientsSeverity - High159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 86. if (rs.next()) ..... 98. tr.addElement(new TD(rs.getString("userid"))); ..... 101. tr.addElement(new TD(rs.getString("salary"))); 102. tr.addElement(new TD(rs.getString("email"))); ..... 107. tr.addElement(new TD(rs.getString("userid"))); 108. tr.addElement(new TD(rs.getString("password"))); ..... 110. tr.addElement(new TD(rs.getString("salary")));Path 182:Query Name - Reflected XSS All ClientsSeverity - High159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... www.itas.vn info@itas.vn .
  • 180. ResultSet rs = statement.executeQuery(arrSQL[0]); www.itas.vn info@itas.vn .
  • 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 86. if (rs.next()) ..... 98. tr.addElement(new TD(rs.getString("userid"))); ..... 101. tr.addElement(new TD(rs.getString("salary"))); 102. tr.addElement(new TD(rs.getString("email"))); ..... 107. tr.addElement(new TD(rs.getString("userid"))); 108. tr.addElement(new TD(rs.getString("password"))); ..... 111. tr.addElement(new TD(rs.getString("email")));Path 183:Query Name - Reflected XSS All ClientsSeverity - High224. protected Element makeUsername(WebSession s) //BackDoors.java ..... 244. String userInput = s.getParser().getRawParameter("username", ""); ..... 249. String formattedInput = "<span class=myClass>" + userInput + "</span>"; 250. ec.addElement(new Div(SELECT_ST + formattedInput));Path 184:Query Name - Reflected XSS All ClientsSeverity - High70. protected Element createContent(WebSession s) //BlindNumericSqlInjection.java ..... 80. String accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101"); 81. Input input = new Input(Input.TEXT, ACCT_NUM, accountNumber.toString());Path 185:Query Name - Reflected XSS All ClientsSeverity - High70. protected Element createContent(WebSession s) //BlindStringSqlInjection.java ..... 80. String accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101"); 81. Input input = new Input(Input.TEXT, ACCT_NUM, accountNumber.toString());Path 186:Query Name - Reflected XSS All ClientsSeverity - High186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 191. String param1 = s.getParser().getRawParameter("field1", ""); www.itas.vn info@itas.vn .
  • ..... www.itas.vn info@itas.vn .
  • 233. Input input = new Input(Input.TEXT, "field1", param1);Path 187:Query Name - Reflected XSS All ClientsSeverity - High186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 228. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 188:Query Name - Reflected XSS All ClientsSeverity - High186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 233. Input input = new Input(Input.TEXT, "field1", param1); www.itas.vn info@itas.vn .
  • Path 189:Query Name - Reflected XSS All ClientsSeverity - High186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 228. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 190:Query Name - Reflected XSS All ClientsSeverity - High186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 233. Input input = new Input(Input.TEXT, "field1", param1); 234. input.setOnKeyUp("isValidCoupon(field1.value)"); 235. tr.addElement(new TD().addElement(input)); www.itas.vn info@itas.vn .
  • Path 191:Query Name - Reflected XSS All ClientsSeverity - High www.itas.vn info@itas.vn .
  • 65. protected Element createContent(WebSession s) //CommandInjection.java ..... 71. String helpFile = s.getParser().getRawParameter(HELP_FILE, "BasicAuthentication.help"); ..... 129. + (helpFile.toString().length() == 0 ? "&lt;"+WebGoatI18N.get("SelectFileFromListBelow")+"&gt;" : helpFile.toString())Path 192:Query Name - Reflected XSS All ClientsSeverity - High160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 172. String param1 = s.getParser().getRawParameter("PAC", "111"); ..... 276. tr.addElement(new TD().addElement(new Input(Input.TEXT, "PAC", param1)).setAlign("right"));Path 193:Query Name - Reflected XSS All ClientsSeverity - High160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 172. String param1 = s.getParser().getRawParameter("PAC", "111"); ..... 276. tr.addElement(new TD().addElement(new Input(Input.TEXT, "PAC", param1)).setAlign("right"));Path 194:Query Name - Reflected XSS All ClientsSeverity - High160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... www.itas.vn info@itas.vn .
  • 270. tr.addElement(new TD().addElement(new Input(Input.TEXT, "CC", www.itas.vn info@itas.vn .
  • param2)).setAlign("right"));Path 195:Query Name - Reflected XSS All ClientsSeverity - High160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 204. tr.addElement(new TD().addElement(String.valueOf(quantity1)).setAlign("center"));Path 196:Query Name - Reflected XSS All ClientsSeverity - High160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... www.itas.vn info@itas.vn .
  • 204. tr.addElement(newTD().addElement(String.valueOf(quantity1)).setAlign("center")); www.itas.vn info@itas.vn .
  • ..... 215. tr.addElement(new TD().addElement(String.valueOf(quantity2)).setAlign("center"));Path 197:Query Name - Reflected XSS All ClientsSeverity - High160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 204. tr.addElement(new TD().addElement(String.valueOf(quantity1)).setAlign("center")); ..... 237. tr.addElement(new TD().addElement(String.valueOf(quantity4)).setAlign("center"));Path 198:Query Name - Reflected XSS All ClientsSeverity - High160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString(); www.itas.vn info@itas.vn .
  • 160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java www.itas.vn info@itas.vn .
  • ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 270. tr.addElement(new TD().addElement(new Input(Input.TEXT, "CC", param2)).setAlign("right"));Path 199:Query Name - Reflected XSS All ClientsSeverity - High140. protected Element doTransfer(WebSession s) { //CSRF.java 141. String transferFunds = HtmlEncoder.encode(s.getParser().getRawParameter(TRANSFER_FUNDS_PARAMETER, ""));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();140. protected Element doTransfer(WebSession s) { //CSRF.java 141. String transferFunds = HtmlEncoder.encode(s.getParser().getRawParameter(TRANSFER_FUNDS_PARAMETER, "")); ..... 159. ec.addElement(new StringElement("Amount Transfered: "+transferFunds));Path 200:Query Name - Reflected XSS All ClientsSeverity - High77. protected Element createContent(WebSession s) //DOS_Login.java ..... 85. username = s.getParser().getRawParameter(USERNAME); ..... 89. if (username.equals("jeff") || username.equals("dave")) ..... 98. String query = "SELECT * FROM user_system_data WHERE user_name = " + username + " and password = " ..... 100. ec.addElement(new StringElement(query));Path 201:Query Name - Reflected XSS All ClientsSeverity - High77. protected Element createContent(WebSession s) //DOS_Login.java ..... 86. password = s.getParser().getRawParameter(PASSWORD); ..... 99. + password + ""; www.itas.vn info@itas.vn .
  • .....106. ResultSet results = statement.executeQuery(query); www.itas.vn info@itas.vn .
  • ..... 111. ec.addElement(DatabaseUtilities.writeTable(results, resultsMetaData));130. public static MultiPartElement writeTable(ResultSet results, ResultSetMetaData resultsMetaData) throws IOException, //DatabaseUtilities.java ..... 157. String str = results.getString(i); ..... 159. row.addElement(new TD(str.replaceAll(" ", "&nbsp;")));Path 202:Query Name - Reflected XSS All ClientsSeverity - High77. protected Element createContent(WebSession s) //DOS_Login.java ..... 86. password = s.getParser().getRawParameter(PASSWORD); ..... 99. + password + ""; 100. ec.addElement(new StringElement(query));Path 203:Query Name - Reflected XSS All ClientsSeverity - High175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 193. Input input = new Input(Input.TEXT, INPUT, userInput);Path 204:Query Name - Reflected XSS All ClientsSeverity - High175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 262. t.addElement(makeRow(description, urlEncode(userInput), urlDecode(userInput)));745. public static String urlDecode(String str) //Encoding.java ..... 749. return (URLDecoder.decode(str, "UTF-8"));175. protected Element createContent(WebSession s) //Encoding.java ..... 262. t.addElement(makeRow(description, urlEncode(userInput), urlDecode(userInput)));604. private TR makeRow(String description, String value1, String value2) //Encoding.java ..... 612. .addElement(new Div().addElement(value2).setStyle("overflow:auto; height:60px; width:100px;")) 613. .setBgColor("#dddddd"); www.itas.vn info@itas.vn .
  • www.itas.vn info@itas.vn .
  • Path 205:Query Name - Reflected XSS All ClientsSeverity - High175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 193. Input input = new Input(Input.TEXT, INPUT, userInput); ..... 195. tr.addElement(new TD().addElement(input));Path 206:Query Name - Reflected XSS All ClientsSeverity - High175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 270. t.addElement(makeRow(description, rot13(userInput), rot13(userInput)));658. public static synchronized String rot13(String input) //Encoding.java ..... 665. char inChar = input.charAt(i); ..... 668. inChar += 13; ..... 671. inChar -= 26; ..... 682. output.append(inChar); ..... 685. return output.toString();175. protected Element createContent(WebSession s) //Encoding.java ..... 270. t.addElement(makeRow(description, rot13(userInput), rot13(userInput)));604. private TR makeRow(String description, String value1, String value2) //Encoding.java ..... 609. .addElement(new Div().addElement(value1).setStyle("overflow:auto; height:60px; width:100px;"))Path 207:Query Name - Reflected XSS All ClientsSeverity - High175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 262. t.addElement(makeRow(description, urlEncode(userInput), urlDecode(userInput)));745. public static String urlDecode(String str) //Encoding.java ..... 749. return (URLDecoder.decode(str, "UTF-8")); www.itas.vn info@itas.vn .
  • 175. protected Element createContent(WebSession s) //Encoding.java ..... 262. t.addElement(makeRow(description, urlEncode(userInput), urlDecode(userInput)));604. private TR makeRow(String description, String value1, String value2) //Encoding.java ..... 612. .addElement(new Div().addElement(value2).setStyle("overflow:auto; height:60px; width:100px;"))Path 208:Query Name - Reflected XSS All ClientsSeverity - High76. protected Element doHTTPSplitting(WebSession s) //HttpSplitting.java ..... 84. lang = URLDecoder.decode(s.getParser().getRawParameter(LANGUAGE, ""), "UTF-8"); ..... 103. String message = lang.substring(lang.indexOf("<html>")); ..... 105. out.print(message);Path 209:Query Name - Reflected XSS All ClientsSeverity - High146. protected Element createAttackEnvironment(WebSession s) throws Exception //HttpSplitting.java ..... 161. lang = URLDecoder.decode(s.getParser().getRawParameter(LANGUAGE, ""), "UTF-8"); ..... 164. Input input = new Input(Input.TEXT, LANGUAGE, lang.toString());Path 210:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 108. String param1 = s.getParser().getRawParameter("field1", "abc"); ..... 116. TextArea input1 = new TextArea("field1", 1, 25).addElement(param1);Path 211:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 108. String param1 = s.getParser().getRawParameter("field1", "abc"); ..... 116. TextArea input1 = new TextArea("field1", 1, 25).addElement(param1); ..... 130. ec.addElement(new Div().addElement(input1)); www.itas.vn info@itas.vn .
  • Path 212:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 109. String param2 = s.getParser().getRawParameter("field2", "123"); ..... 117. TextArea input2 = new TextArea("field2", 1, 25).addElement(param2);Path 213:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 109. String param2 = s.getParser().getRawParameter("field2", "123"); ..... 117. TextArea input2 = new TextArea("field2", 1, 25).addElement(param2); ..... 133. ec.addElement(new Div().addElement(input2));Path 214:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 110. String param3 = s.getParser().getRawParameter("field3", "abc 123 ABC"); ..... 118. TextArea input3 = new TextArea("field3", 1, 25).addElement(param3);Path 215:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 110. String param3 = s.getParser().getRawParameter("field3", "abc 123 ABC"); ..... 118. TextArea input3 = new TextArea("field3", 1, 25).addElement(param3); ..... 137. ec.addElement(new Div().addElement(input3));Path 216:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 111. String param4 = s.getParser().getRawParameter("field4", "seven"); ..... 119. TextArea input4 = new TextArea("field4", 1, 25).addElement(param4); www.itas.vn info@itas.vn .
  • Path 217:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 111. String param4 = s.getParser().getRawParameter("field4", "seven"); ..... 119. TextArea input4 = new TextArea("field4", 1, 25).addElement(param4); ..... 140. ec.addElement(new Div().addElement(input4));Path 218:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 112. String param5 = s.getParser().getRawParameter("field5", "90210"); ..... 120. TextArea input5 = new TextArea("field5", 1, 25).addElement(param5);Path 219:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 112. String param5 = s.getParser().getRawParameter("field5", "90210"); ..... 120. TextArea input5 = new TextArea("field5", 1, 25).addElement(param5); ..... 143. ec.addElement(new Div().addElement(input5));Path 220:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 113. String param6 = s.getParser().getRawParameter("field6", "90210-1111"); ..... 121. TextArea input6 = new TextArea("field6", 1, 25).addElement(param6);Path 221:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 113. String param6 = s.getParser().getRawParameter("field6", "90210-1111"); ..... 121. TextArea input6 = new TextArea("field6", 1, 25).addElement(param6); ..... 147. ec.addElement(new Div().addElement(input6)); www.itas.vn info@itas.vn .
  • www.itas.vn info@itas.vn .
  • Path 222:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 114. String param7 = s.getParser().getRawParameter("field7", "301-604-4882"); ..... 122. TextArea input7 = new TextArea("field7", 1, 25).addElement(param7);Path 223:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 114. String param7 = s.getParser().getRawParameter("field7", "301-604-4882"); ..... 122. TextArea input7 = new TextArea("field7", 1, 25).addElement(param7); ..... 151. ec.addElement(new Div().addElement(input7));Path 224:Query Name - Reflected XSS All ClientsSeverity - High64. protected Element createContent(WebSession s) //LogSpoofing.java ..... 96. inputUsername = new String(s.getParser().getRawParameter(USERNAME, "")); ..... 99. inputUsername = URLDecoder.decode(inputUsername, "UTF-8"); ..... 106. row4.addElement(new TD(new PRE(WebGoatI18N.get("LoginFailedForUserName")+": " + inputUsername))).setBgColor(HtmlColor.GRAY);Path 225:Query Name - Reflected XSS All ClientsSeverity - High64. protected Element createContent(WebSession s) //LogSpoofing.java ..... 96. inputUsername = new String(s.getParser().getRawParameter(USERNAME, "")); ..... 99. inputUsername = URLDecoder.decode(inputUsername, "UTF-8"); ..... 106. row4.addElement(new TD(new PRE(WebGoatI18N.get("LoginFailedForUserName")+": " + inputUsername))).setBgColor(HtmlColor.GRAY);Path 226:Query Name - Reflected XSS All ClientsSeverity - High87. protected Element createContent(WebSession s) //Phishing.java ..... 93. searchText = s.getParser().getRawParameter(SEARCH, ""); www.itas.vn info@itas.vn .
  • ..... www.itas.vn info@itas.vn .
  • 97. ec.addElement(makeSearch(s));110. protected Element makeSearch(WebSession s) //Phishing.java ..... 137. Input input1 = new Input(Input.TEXT, SEARCH, searchText);Path 227:Query Name - Reflected XSS All ClientsSeverity - High87. protected Element createContent(WebSession s) //Phishing.java ..... 93. searchText = s.getParser().getRawParameter(SEARCH, ""); ..... 97. ec.addElement(makeSearch(s));110. protected Element makeSearch(WebSession s) //Phishing.java ..... 137. Input input1 = new Input(Input.TEXT, SEARCH, searchText); 138. row1.addElement(new TD(input1).setAlign("left"));Path 228:Query Name - Reflected XSS All ClientsSeverity - High87. protected Element createContent(WebSession s) //Phishing.java ..... 93. searchText = s.getParser().getRawParameter(SEARCH, ""); ..... 97. ec.addElement(makeSearch(s));110. protected Element makeSearch(WebSession s) //Phishing.java ..... 150. ec.addElement(new StringElement("Results for: " + searchText));Path 229:Query Name - Reflected XSS All ClientsSeverity - High66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 75. String param1 = s.getParser().getRawParameter("field1", "111"); ..... 187. tr.addElement(new TD().addElement("<input name=field1 type=TEXT value=" + param1 + ">"));Path 230:Query Name - Reflected XSS All ClientsSeverity - High66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 76. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); www.itas.vn info@itas.vn .
  • 140. public static String encode(String s1) //HtmlEncoder.java ..... www.itas.vn info@itas.vn .
  • 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 76. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 183. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 231:Query Name - Reflected XSS All ClientsSeverity - High66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 76. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 76. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 183. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 232:Query Name - Reflected XSS All ClientsSeverity - High80. protected Element createContent(WebSession s) //SessionFixation.java ..... 144. String mailContent = s.getParser().getRawParameter(MAILCONTENTNAME, ""); ..... 147. s.add(MAILCONTENTNAME, mailContent);251. public void add(String key, Object value) //WebSession.java ..... 253. session.put(key, value); www.itas.vn info@itas.vn .
  • 80. protected Element createContent(WebSession s) //SessionFixation.java ..... www.itas.vn info@itas.vn .
  • 147. s.add(MAILCONTENTNAME, mailContent); ..... 155. return super.createStagedContent(s);61. protected Element createStagedContent(WebSession s) //SequentialLessonAdapter.java ..... 76. return (doStage3(s));200. protected Element doStage3(WebSession s) throws Exception //SessionFixation.java ..... 202. return createStage3Content(s);224. private Element createStage3Content(WebSession s) //SessionFixation.java ..... 227. return createMainLoginContent(s);330. protected Element createMainLoginContent(WebSession s) //SessionFixation.java ..... 374. workspaceDiv.addElement(createWorkspaceContent(s));392. private Element createWorkspaceContent(WebSession s) //SessionFixation.java ..... 395. String name = s.getParser().getStringParameter(USER, ""); 396. String password = s.getParser().getStringParameter(PASSWORD, ""); ..... 414. else if (sid.equals(s.get("SID")) && s.get(LOGGEDIN).equals("true")) ..... 417. createSuccessfulLoginContent(s, ec);553. private void createSuccessfulLoginContent(WebSession s, ElementContainer ec) //SessionFixation.java ..... 570. tr1.addElement(new TD(getLoggedInUser(s)));671. private String getLoggedInUser(WebSession s) //SessionFixation.java ..... 675. String user = (String) s.get(LOGGEDINUSER);288. public Object get(String key) //WebSession.java ..... 290. return (session.get(key));671. private String getLoggedInUser(WebSession s) //SessionFixation.java ..... 675. String user = (String) s.get(LOGGEDINUSER); 676. return user;553. private void createSuccessfulLoginContent(WebSession s, ElementContainer ec) //SessionFixation.java ..... 570. tr1.addElement(new TD(getLoggedInUser(s)));Path 233:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High65. public void handleRequest(WebSession s) //SilentTransactions.java ..... www.itas.vn info@itas.vn .
  • 74. String amount = s.getParser().getRawParameter("amount", ""); ..... 83. result.append(amount); ..... 88. result.append(" and happens to be logged in the same time will loose their money !!"); 89. out.print(result.toString());Path 234:Query Name - Reflected XSS All ClientsSeverity - High143. protected Element makeAccountLine(WebSession s) //SqlAddData.java ..... 148. userid = s.getParser().getRawParameter(USERID, "jsmith"); 149. Input input = new Input(Input.TEXT, USERID, userid.toString());Path 235:Query Name - Reflected XSS All ClientsSeverity - High161. protected Element makeAccountLine(WebSession s) //SqlModifyData.java ..... 166. userid = s.getParser().getRawParameter(USERID, "jsmith"); 167. Input input = new Input(Input.TEXT, USERID, userid.toString());Path 236:Query Name - Reflected XSS All ClientsSeverity - High87. protected Element injectableQuery(WebSession s) //SqlNumericInjection.java ..... 98. station = s.getParser().getRawParameter(STATION_ID, null); ..... 106. query = "SELECT * FROM weather_data WHERE station = " + station; ..... 109. ec.addElement(new PRE(query));Path 237:Query Name - Reflected XSS All ClientsSeverity - High87. protected Element injectableQuery(WebSession s) //SqlNumericInjection.java ..... 98. station = s.getParser().getRawParameter(STATION_ID, null); ..... 106. query = "SELECT * FROM weather_data WHERE station = " + station; ..... 119. ResultSet results = statement.executeQuery(query); ..... 121. if ((results != null) && (results.first() == true)) ..... www.itas.vn info@itas.vn .
  • 124. ec.addElement(DatabaseUtilities.writeTable(results, resultsMetaData)); www.itas.vn info@itas.vn .
  • 130. public static MultiPartElement writeTable(ResultSet results, ResultSetMetaData resultsMetaData) throws IOException, //DatabaseUtilities.java ..... 157. String str = results.getString(i); ..... 159. row.addElement(new TD(str.replaceAll(" ", "&nbsp;")));Path 238:Query Name - Reflected XSS All ClientsSeverity - High198. protected Element makeAccountLine(WebSession s) //SqlStringInjection.java ..... 203. accountName = s.getParser().getRawParameter(ACCT_NAME, "Your Name"); 204. Input input = new Input(Input.TEXT, ACCT_NAME, accountName.toString());Path 239:Query Name - Reflected XSS All ClientsSeverity - High198. protected Element makeAccountLine(WebSession s) //SqlStringInjection.java ..... 203. accountName = s.getParser().getRawParameter(ACCT_NAME, "Your Name");84. protected Element injectableQuery(WebSession s) //SqlStringInjection.java ..... 92. ec.addElement(makeAccountLine(s)); ..... 94. String query = "SELECT * FROM user_data WHERE last_name = " + accountName + ""; 95. ec.addElement(new PRE(query));Path 240:Query Name - Reflected XSS All ClientsSeverity - High70. protected Element createContent(WebSession s) //ThreadSafetyProblem.java ..... 80. currentUser = s.getParser().getRawParameter(USER_NAME, ""); ..... 95. String query = "SELECT * FROM user_system_data WHERE user_name = " + currentUser + ""; ..... 98. ResultSet results = statement.executeQuery(query); ..... 100. if ((results != null) && (results.first() == true)) ..... 104. ec.addElement(DatabaseUtilities.writeTable(results, resultsMetaData));130. public static MultiPartElement writeTable(ResultSet results, ResultSetMetaData resultsMetaData) throws IOException, //DatabaseUtilities.java ..... 157. String str = results.getString(i); ..... 159. row.addElement(new TD(str.replaceAll(" ", "&nbsp;"))); www.itas.vn info@itas.vn .
  • www.itas.vn info@itas.vn .
  • Path 241:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //TraceXSS.java ..... 74. String param1 = s.getParser().getRawParameter("field1", "111"); ..... 184. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field1", param1)));Path 242:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //TraceXSS.java ..... 74. String param1 = s.getParser().getRawParameter("field1", "111"); ..... 184. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field1", param1)));Path 243:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //TraceXSS.java ..... 75. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();65. protected Element createContent(WebSession s) //TraceXSS.java ..... 75. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 180. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 244:Query Name - Reflected XSS All ClientsSeverity - High65. protected Element createContent(WebSession s) //TraceXSS.java ..... 75. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java www.itas.vn info@itas.vn .
  • .....147. char ch = s1.charAt(i);..... www.itas.vn info@itas.vn .
  • 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();65. protected Element createContent(WebSession s) //TraceXSS.java ..... 75. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 180. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 245:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 362. addressTo[0] = new InternetAddress(recipients); ..... 364. msg.setRecipients(Message.RecipientType.TO, addressTo); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 155. ec.addElement(new StringElement("<b>MAIL FROM:</b> " + Arrays.asList(sentMessage.getReplyTo())));Path 246:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); www.itas.vn info@itas.vn .
  • 330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java www.itas.vn info@itas.vn .
  • ..... 362. addressTo[0] = new InternetAddress(recipients); ..... 364. msg.setRecipients(Message.RecipientType.TO, addressTo); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 157. ec.addElement(new StringElement("<b>RCPT TO:</b> " + Arrays.asList(sentMessage.getAllRecipients())));Path 247:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 362. addressTo[0] = new InternetAddress(recipients); ..... 364. msg.setRecipients(Message.RecipientType.TO, addressTo); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 163. ec.addElement(new StringElement("<b>Date:</b> " + sentMessage.getSentDate()));Path 248:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... www.itas.vn info@itas.vn .
  • 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 199. ec.addElement(new StringElement("<b>Delivered-To:</b> " + to));Path 249:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 203. ec.addElement(new StringElement("for &lt;" + to + "&gt;; " + today));Path 250:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 205. ec.addElement(new StringElement("<b>To:</b> " + to));Path 251:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 362. addressTo[0] = new InternetAddress(recipients); ..... 364. msg.setRecipients(Message.RecipientType.TO, addressTo); ..... 371. return msg; www.itas.vn info@itas.vn .
  • 94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 153. + Arrays.asList(sentMessage.getAllRecipients()))));Path 252:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 195. ec.addElement(new Center().addElement(new B().addElement("You sent the following message to: " + to)));Path 253:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 368. msg.setContent(message, "text/plain"); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 155. ec.addElement(new StringElement("<b>MAIL FROM:</b> " + Arrays.asList(sentMessage.getReplyTo()))); www.itas.vn info@itas.vn .
  • Path 254:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 368. msg.setContent(message, "text/plain"); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 157. ec.addElement(new StringElement("<b>RCPT TO:</b> " + Arrays.asList(sentMessage.getAllRecipients())));Path 255:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 368. msg.setContent(message, "text/plain"); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 161. + Arrays.asList(sentMessage.getHeader("Message-ID"))));Path 256: www.itas.vn info@itas.vn .
  • Query Name - Reflected XSS All ClientsSeverity - High www.itas.vn info@itas.vn .
  • 94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 368. msg.setContent(message, "text/plain"); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 163. ec.addElement(new StringElement("<b>Date:</b> " + sentMessage.getSentDate()));Path 257:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 368. msg.setContent(message, "text/plain"); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 165. ec.addElement(new StringElement("<b>Subject:</b> " + sentMessage.getSubject()));Path 258:Query Name - Reflected XSS All ClientsSeverity - High www.itas.vn info@itas.vn .
  • 94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); www.itas.vn info@itas.vn .
  • ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 368. msg.setContent(message, "text/plain"); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 170. ec.addElement(new StringElement(sentMessage.getContent().toString()));Path 259:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 212. ec.addElement(new StringElement(message));Path 260:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 112. createMailMessage(s, subject, message, ec);220. private void createMailMessage(WebSession s, String subject, String message, ElementContainer ec) //UncheckedEmail.java ..... 275. ta.addElement(new StringElement(convertMetachars(message)));275. protected static String convertMetachars(String token) //Screen.java ..... 290. String replacedString = token; ..... 293. replacedString = replacedString.replaceAll(metaChar[mci], htmlCode[mci]); www.itas.vn info@itas.vn .
  • ..... www.itas.vn info@itas.vn .
  • 295. return (replacedString);220. private void createMailMessage(WebSession s, String subject, String message, ElementContainer ec) //UncheckedEmail.java ..... 275. ta.addElement(new StringElement(convertMetachars(message)));Path 261:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 368. msg.setContent(message, "text/plain"); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 153. + Arrays.asList(sentMessage.getAllRecipients()))));Path 262:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 112. createMailMessage(s, subject, message, ec);220. private void createMailMessage(WebSession s, String subject, String message, ElementContainer ec) //UncheckedEmail.java ..... 275. ta.addElement(new StringElement(convertMetachars(message)));275. protected static String convertMetachars(String token) //Screen.java ..... 290. String replacedString = token; ..... 293. replacedString = replacedString.replaceAll(metaChar[mci], htmlCode[mci]); ..... www.itas.vn info@itas.vn .
  • 295. return (replacedString); www.itas.vn info@itas.vn .
  • 220. private void createMailMessage(WebSession s, String subject, String message, ElementContainer ec) //UncheckedEmail.java ..... 275. ta.addElement(new StringElement(convertMetachars(message))); 276. tr.addElement(new TD().setAlign("LEFT").addElement(ta).setColSpan(2));Path 263:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 155. ec.addElement(new StringElement("<b>MAIL FROM:</b> " + Arrays.asList(sentMessage.getReplyTo())));Path 264:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); www.itas.vn info@itas.vn .
  • 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 157. ec.addElement(new StringElement("<b>RCPT TO:</b> " + Arrays.asList(sentMessage.getAllRecipients())));Path 265:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 161. + Arrays.asList(sentMessage.getHeader("Message-ID"))));Path 266:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); www.itas.vn info@itas.vn .
  • 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 163. ec.addElement(new StringElement("<b>Date:</b> " + sentMessage.getSentDate()));Path 267:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 165. ec.addElement(new StringElement("<b>Subject:</b> " + sentMessage.getSubject()));Path 268:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); www.itas.vn info@itas.vn .
  • 121. formatMail(ec, sentMessage); www.itas.vn info@itas.vn .
  • 148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 170. ec.addElement(new StringElement(sentMessage.getContent().toString()));Path 269:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 209. ec.addElement(new StringElement("<b>Subject:</b> " + subject));Path 270:Query Name - Reflected XSS All ClientsSeverity - High94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 153. + Arrays.asList(sentMessage.getAllRecipients()))));Path 271:Query Name - Reflected XSS All ClientsSeverity - High155. protected Element makeAccountLine(WebSession s) //WsSqlInjection.java ..... 161. accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101"); 162. Input input = new Input(Input.TEXT, ACCT_NUM, accountNumber.toString()); www.itas.vn info@itas.vn .
  • www.itas.vn info@itas.vn .
  • Path 272:Query Name - Reflected XSS All ClientsSeverity - High155. protected Element makeAccountLine(WebSession s) //WsSqlInjection.java ..... 161. accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101");171. protected Element createContent(WebSession s) //WsSqlInjection.java ..... 176. ec.addElement(makeAccountLine(s)); ..... 178. String query = "SELECT * FROM user_data WHERE userid = " + accountNumber; 179. ec.addElement(new PRE(query));Path 273:Query Name - Reflected XSS All ClientsSeverity - High81. protected Element createContent(WebSession s) //XPATHInjection.java ..... 124. String username = s.getParser().getRawParameter(USERNAME, ""); ..... 143. String expression = "/employees/employee[loginID/text()=" + username + " and passwd/text()=" + password ..... 145. nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET); ..... 162. Node node = nodes.item(i); 163. String[] arrTokens = node.getTextContent().split("[tsn]+"); ..... 166. tr.addElement(new TD().addElement(arrTokens[1]));Path 274:Query Name - Reflected XSS All ClientsSeverity - High81. protected Element createContent(WebSession s) //XPATHInjection.java ..... 124. String username = s.getParser().getRawParameter(USERNAME, ""); ..... 143. String expression = "/employees/employee[loginID/text()=" + username + " and passwd/text()=" + password ..... 145. nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET); ..... 162. Node node = nodes.item(i); 163. String[] arrTokens = node.getTextContent().split("[tsn]+"); ..... 167. tr.addElement(new TD().addElement(arrTokens[2])); www.itas.vn info@itas.vn .
  • Path 275:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High81. protected Element createContent(WebSession s) //XPATHInjection.java ..... 124. String username = s.getParser().getRawParameter(USERNAME, ""); ..... 143. String expression = "/employees/employee[loginID/text()=" + username + " and passwd/text()=" + password ..... 145. nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET); ..... 162. Node node = nodes.item(i); 163. String[] arrTokens = node.getTextContent().split("[tsn]+"); ..... 168. tr.addElement(new TD().addElement(arrTokens[4]));Path 276:Query Name - Reflected XSS All ClientsSeverity - High81. protected Element createContent(WebSession s) //XPATHInjection.java ..... 131. String password = s.getParser().getRawParameter(PASSWORD, ""); ..... 143. String expression = "/employees/employee[loginID/text()=" + username + " and passwd/text()=" + password ..... 145. nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET); ..... 162. Node node = nodes.item(i); 163. String[] arrTokens = node.getTextContent().split("[tsn]+"); ..... 166. tr.addElement(new TD().addElement(arrTokens[1]));Path 277:Query Name - Reflected XSS All ClientsSeverity - High81. protected Element createContent(WebSession s) //XPATHInjection.java ..... 131. String password = s.getParser().getRawParameter(PASSWORD, ""); ..... 143. String expression = "/employees/employee[loginID/text()=" + username + " and passwd/text()=" + password ..... 145. nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET); ..... 162. Node node = nodes.item(i); 163. String[] arrTokens = node.getTextContent().split("[tsn]+"); ..... 167. tr.addElement(new TD().addElement(arrTokens[2])); www.itas.vn info@itas.vn .
  • www.itas.vn info@itas.vn .
  • Path 278:Query Name - Reflected XSS All ClientsSeverity - High81. protected Element createContent(WebSession s) //XPATHInjection.java ..... 131. String password = s.getParser().getRawParameter(PASSWORD, ""); ..... 143. String expression = "/employees/employee[loginID/text()=" + username + " and passwd/text()=" + password ..... 145. nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET); ..... 162. Node node = nodes.item(i); 163. String[] arrTokens = node.getTextContent().split("[tsn]+"); ..... 168. tr.addElement(new TD().addElement(arrTokens[4]));Path 279:Query Name - Reflected XSS All ClientsSeverity - High69. protected Element createContent(WebSession s) //ReportCardScreen.java ..... 79. user = s.getParser().getRawParameter(USERNAME); ..... 95. ec.addElement(makeReportCard(s, user));207. public Element makeReportCard(WebSession s, String user) //ReportCardScreen.java ..... 211. ec.addElement(makeUser(s, user));267. protected Element makeUser(WebSession s, String user) //ReportCardScreen.java ..... 274. h2.addElement(new StringElement("Results for: " + user + type));Path 280:Query Name - Reflected XSS All ClientsSeverity - High60. protected Element createContent(WebSession s) //ViewDatabase.java ..... 68. StringBuffer sqlStatement = new StringBuffer(s.getParser().getRawParameter(SQL, "")); 69. Input input = new Input(Input.TEXT, SQL, sqlStatement.toString());Path 281:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name); www.itas.vn info@itas.vn .
  • 76. protected Element doHTTPSplitting(WebSession s) //HttpSplitting.java ..... 84. lang = URLDecoder.decode(s.getParser().getRawParameter(LANGUAGE, ""), "UTF-8"); www.itas.vn info@itas.vn .
  • ..... 103. String message = lang.substring(lang.indexOf("<html>")); ..... 105. out.print(message);Path 282:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. public void handleRequest(WebSession s) //SilentTransactions.java ..... 74. String amount = s.getParser().getRawParameter("amount", ""); ..... 83. result.append(amount); ..... 88. result.append(" and happens to be logged in the same time will loose their money !!"); 89. out.print(result.toString());Path 283:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);224. protected Element makeUsername(WebSession s) //BackDoors.java ..... 244. String userInput = s.getParser().getRawParameter("username", ""); ..... 249. String formattedInput = "<span class=myClass>" + userInput + "</span>"; 250. ec.addElement(new Div(SELECT_ST + formattedInput));Path 284:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);70. protected Element createContent(WebSession s) //BlindNumericSqlInjection.java ..... 80. String accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101"); 81. Input input = new Input(Input.TEXT, ACCT_NUM, accountNumber.toString()); www.itas.vn info@itas.vn .
  • Path 285:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);70. protected Element createContent(WebSession s) //BlindStringSqlInjection.java ..... 80. String accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101"); 81. Input input = new Input(Input.TEXT, ACCT_NUM, accountNumber.toString());Path 286:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 228. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 287:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); www.itas.vn info@itas.vn .
  • .....149. String entity = i2e.get(new Integer((int) ch)); www.itas.vn info@itas.vn .
  • ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 233. Input input = new Input(Input.TEXT, "field1", param1);Path 288:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 270. tr.addElement(new TD().addElement(new Input(Input.TEXT, "CC", param2)).setAlign("right"));Path 289:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... www.itas.vn info@itas.vn .
  • 172. String param1 = s.getParser().getRawParameter("PAC", "111");..... www.itas.vn info@itas.vn .
  • 276. tr.addElement(new TD().addElement(new Input(Input.TEXT, "PAC", param1)).setAlign("right"));Path 290:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 193. Input input = new Input(Input.TEXT, INPUT, userInput);Path 291:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);146. protected Element createAttackEnvironment(WebSession s) throws Exception //HttpSplitting.java ..... 161. lang = URLDecoder.decode(s.getParser().getRawParameter(LANGUAGE, ""), "UTF-8"); ..... 164. Input input = new Input(Input.TEXT, LANGUAGE, lang.toString());Path 292:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);87. protected Element createContent(WebSession s) //Phishing.java ..... 93. searchText = s.getParser().getRawParameter(SEARCH, ""); ..... 97. ec.addElement(makeSearch(s));110. protected Element makeSearch(WebSession s) //Phishing.java ..... 137. Input input1 = new Input(Input.TEXT, SEARCH, searchText);Path 293:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java www.itas.vn info@itas.vn .
  • ..... www.itas.vn info@itas.vn .
  • 597. return getRawParameter(name);66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 76. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 76. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 183. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 294:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);143. protected Element makeAccountLine(WebSession s) //SqlAddData.java ..... 148. userid = s.getParser().getRawParameter(USERID, "jsmith"); 149. Input input = new Input(Input.TEXT, USERID, userid.toString());Path 295:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);161. protected Element makeAccountLine(WebSession s) //SqlModifyData.java ..... 166. userid = s.getParser().getRawParameter(USERID, "jsmith"); 167. Input input = new Input(Input.TEXT, USERID, userid.toString());Path 296:Query Name - Reflected XSS All ClientsSeverity - High www.itas.vn info@itas.vn .
  • 593. public String getRawParameter(String name, String def) //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 597. return getRawParameter(name);198. protected Element makeAccountLine(WebSession s) //SqlStringInjection.java ..... 203. accountName = s.getParser().getRawParameter(ACCT_NAME, "Your Name"); 204. Input input = new Input(Input.TEXT, ACCT_NAME, accountName.toString());Path 297:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 75. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();65. protected Element createContent(WebSession s) //TraceXSS.java ..... 75. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 180. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 298:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 74. String param1 = s.getParser().getRawParameter("field1", "111"); ..... 184. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field1", param1)));Path 299:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 597. return getRawParameter(name);155. protected Element makeAccountLine(WebSession s) //WsSqlInjection.java ..... 161. accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101"); 162. Input input = new Input(Input.TEXT, ACCT_NUM, accountNumber.toString());Path 300:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);60. protected Element createContent(WebSession s) //ViewDatabase.java ..... 68. StringBuffer sqlStatement = new StringBuffer(s.getParser().getRawParameter(SQL, "")); 69. Input input = new Input(Input.TEXT, SQL, sqlStatement.toString());Path 301:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);64. protected Element createContent(WebSession s) //LogSpoofing.java ..... 96. inputUsername = new String(s.getParser().getRawParameter(USERNAME, "")); ..... 99. inputUsername = URLDecoder.decode(inputUsername, "UTF-8"); ..... 106. row4.addElement(new TD(new PRE(WebGoatI18N.get("LoginFailedForUserName")+": " + inputUsername))).setBgColor(HtmlColor.GRAY);Path 302:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);87. protected Element injectableQuery(WebSession s) //SqlNumericInjection.java ..... 98. station = s.getParser().getRawParameter(STATION_ID, null); ..... 106. query = "SELECT * FROM weather_data WHERE station = " + station; ..... 109. ec.addElement(new PRE(query)); www.itas.vn info@itas.vn .
  • Path 303:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);198. protected Element makeAccountLine(WebSession s) //SqlStringInjection.java ..... 203. accountName = s.getParser().getRawParameter(ACCT_NAME, "Your Name");84. protected Element injectableQuery(WebSession s) //SqlStringInjection.java ..... 92. ec.addElement(makeAccountLine(s)); ..... 94. String query = "SELECT * FROM user_data WHERE last_name = " + accountName + ""; 95. ec.addElement(new PRE(query));Path 304:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);155. protected Element makeAccountLine(WebSession s) //WsSqlInjection.java ..... 161. accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101");171. protected Element createContent(WebSession s) //WsSqlInjection.java ..... 176. ec.addElement(makeAccountLine(s)); ..... 178. String query = "SELECT * FROM user_data WHERE userid = " + accountNumber; 179. ec.addElement(new PRE(query));Path 305:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... www.itas.vn info@itas.vn .
  • 180. ResultSet rs = statement.executeQuery(arrSQL[0]); www.itas.vn info@itas.vn .
  • 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 98. tr.addElement(new TD(rs.getString("userid")));Path 306:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 99. tr.addElement(new TD(rs.getString("password")));Path 307:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 100. tr.addElement(new TD(rs.getString("ssn"))); www.itas.vn info@itas.vn .
  • www.itas.vn info@itas.vn .
  • Path 308:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 101. tr.addElement(new TD(rs.getString("salary")));Path 309:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 102. tr.addElement(new TD(rs.getString("email")));Path 310:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 597. return getRawParameter(name); www.itas.vn info@itas.vn .
  • 159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 86. if (rs.next()) ..... 98. tr.addElement(new TD(rs.getString("userid"))); ..... 101. tr.addElement(new TD(rs.getString("salary"))); 102. tr.addElement(new TD(rs.getString("email"))); ..... 107. tr.addElement(new TD(rs.getString("userid"))); 108. tr.addElement(new TD(rs.getString("password")));Path 311:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 86. if (rs.next()) ..... 98. tr.addElement(new TD(rs.getString("userid"))); ..... www.itas.vn info@itas.vn .
  • 101. tr.addElement(new TD(rs.getString("salary")));102. tr.addElement(new TD(rs.getString("email"))); www.itas.vn info@itas.vn .
  • ..... 107. tr.addElement(new TD(rs.getString("userid"))); 108. tr.addElement(new TD(rs.getString("password"))); 109. tr.addElement(new TD(rs.getString("ssn")));Path 312:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 86. if (rs.next()) ..... 98. tr.addElement(new TD(rs.getString("userid"))); ..... 101. tr.addElement(new TD(rs.getString("salary"))); 102. tr.addElement(new TD(rs.getString("email"))); ..... 107. tr.addElement(new TD(rs.getString("userid"))); 108. tr.addElement(new TD(rs.getString("password"))); ..... 110. tr.addElement(new TD(rs.getString("salary")));Path 313:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... www.itas.vn info@itas.vn .
  • 166. if (!userInput.equals(""))..... www.itas.vn info@itas.vn .
  • 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]); 181. addDBEntriesToEC(ec, rs);82. private void addDBEntriesToEC(ElementContainer ec, ResultSet rs) //BackDoors.java ..... 86. if (rs.next()) ..... 98. tr.addElement(new TD(rs.getString("userid"))); ..... 101. tr.addElement(new TD(rs.getString("salary"))); 102. tr.addElement(new TD(rs.getString("email"))); ..... 107. tr.addElement(new TD(rs.getString("userid"))); 108. tr.addElement(new TD(rs.getString("password"))); ..... 111. tr.addElement(new TD(rs.getString("email")));Path 314:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);64. protected Element createContent(WebSession s) //LogSpoofing.java ..... 96. inputUsername = new String(s.getParser().getRawParameter(USERNAME, "")); ..... 99. inputUsername = URLDecoder.decode(inputUsername, "UTF-8"); ..... 106. row4.addElement(new TD(new PRE(WebGoatI18N.get("LoginFailedForUserName")+": " + inputUsername))).setBgColor(HtmlColor.GRAY);Path 315:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);87. protected Element createContent(WebSession s) //Phishing.java ..... 93. searchText = s.getParser().getRawParameter(SEARCH, ""); ..... 97. ec.addElement(makeSearch(s));110. protected Element makeSearch(WebSession s) //Phishing.java www.itas.vn info@itas.vn .
  • .....137. Input input1 = new Input(Input.TEXT, SEARCH, searchText); www.itas.vn info@itas.vn .
  • 138. row1.addElement(new TD(input1).setAlign("left"));Path 316:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);80. protected Element createContent(WebSession s) //SessionFixation.java ..... 144. String mailContent = s.getParser().getRawParameter(MAILCONTENTNAME, ""); ..... 147. s.add(MAILCONTENTNAME, mailContent);251. public void add(String key, Object value) //WebSession.java ..... 253. session.put(key, value);80. protected Element createContent(WebSession s) //SessionFixation.java ..... 147. s.add(MAILCONTENTNAME, mailContent); ..... 155. return super.createStagedContent(s);61. protected Element createStagedContent(WebSession s) //SequentialLessonAdapter.java ..... 76. return (doStage3(s));200. protected Element doStage3(WebSession s) throws Exception //SessionFixation.java ..... 202. return createStage3Content(s);224. private Element createStage3Content(WebSession s) //SessionFixation.java ..... 227. return createMainLoginContent(s);330. protected Element createMainLoginContent(WebSession s) //SessionFixation.java ..... 374. workspaceDiv.addElement(createWorkspaceContent(s));392. private Element createWorkspaceContent(WebSession s) //SessionFixation.java ..... 395. String name = s.getParser().getStringParameter(USER, ""); 396. String password = s.getParser().getStringParameter(PASSWORD, ""); ..... 414. else if (sid.equals(s.get("SID")) && s.get(LOGGEDIN).equals("true")) ..... 417. createSuccessfulLoginContent(s, ec);553. private void createSuccessfulLoginContent(WebSession s, ElementContainer ec) //SessionFixation.java ..... 570. tr1.addElement(new TD(getLoggedInUser(s))); www.itas.vn info@itas.vn .
  • 671. private String getLoggedInUser(WebSession s) //SessionFixation.java ..... www.itas.vn info@itas.vn .
  • 675. String user = (String) s.get(LOGGEDINUSER);288. public Object get(String key) //WebSession.java ..... 290. return (session.get(key));671. private String getLoggedInUser(WebSession s) //SessionFixation.java ..... 675. String user = (String) s.get(LOGGEDINUSER); 676. return user;553. private void createSuccessfulLoginContent(WebSession s, ElementContainer ec) //SessionFixation.java ..... 570. tr1.addElement(new TD(getLoggedInUser(s)));Path 317:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);70. protected Element createContent(WebSession s) //ThreadSafetyProblem.java ..... 80. currentUser = s.getParser().getRawParameter(USER_NAME, ""); ..... 95. String query = "SELECT * FROM user_system_data WHERE user_name = " + currentUser + ""; ..... 98. ResultSet results = statement.executeQuery(query); ..... 100. if ((results != null) && (results.first() == true)) ..... 104. ec.addElement(DatabaseUtilities.writeTable(results, resultsMetaData));130. public static MultiPartElement writeTable(ResultSet results, ResultSetMetaData resultsMetaData) throws IOException, //DatabaseUtilities.java ..... 157. String str = results.getString(i); ..... 159. row.addElement(new TD(str.replaceAll(" ", "&nbsp;")));Path 318:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //CommandInjection.java ..... 71. String helpFile = s.getParser().getRawParameter(HELP_FILE, "BasicAuthentication.help"); www.itas.vn info@itas.vn .
  • .....129. + (helpFile.toString().length() == 0 ? www.itas.vn info@itas.vn .
  • "&lt;"+WebGoatI18N.get("SelectFileFromListBelow")+"&gt;" : helpFile.toString())Path 319:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);140. protected Element doTransfer(WebSession s) { //CSRF.java 141. String transferFunds = HtmlEncoder.encode(s.getParser().getRawParameter(TRANSFER_FUNDS_PARAMETER, ""));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();140. protected Element doTransfer(WebSession s) { //CSRF.java 141. String transferFunds = HtmlEncoder.encode(s.getParser().getRawParameter(TRANSFER_FUNDS_PARAMETER, "")); ..... 159. ec.addElement(new StringElement("Amount Transfered: "+transferFunds));Path 320:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);72. protected Element doTransfer(WebSession s) { //CsrfTokenByPass.java 73. String transferFunds = HtmlEncoder.encode(s.getParser().getRawParameter(TRANSFER_FUNDS_PARAMETER, ""));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();72. protected Element doTransfer(WebSession s) { //CsrfTokenByPass.java 73. String transferFunds = HtmlEncoder.encode(s.getParser().getRawParameter(TRANSFER_FUNDS_PARAMETER, "")); www.itas.vn info@itas.vn .
  • ..... www.itas.vn info@itas.vn .
  • 109. ec.addElement(new StringElement("Amount Transfered: "+transferFunds));Path 321:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);87. protected Element createContent(WebSession s) //Phishing.java ..... 93. searchText = s.getParser().getRawParameter(SEARCH, ""); ..... 97. ec.addElement(makeSearch(s));110. protected Element makeSearch(WebSession s) //Phishing.java ..... 150. ec.addElement(new StringElement("Results for: " + searchText));Path 322:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 155. ec.addElement(new StringElement("<b>MAIL FROM:</b> " + Arrays.asList(sentMessage.getReplyTo())));Path 323: www.itas.vn info@itas.vn .
  • Query Name - Reflected XSS All ClientsSeverity - High www.itas.vn info@itas.vn .
  • 593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 157. ec.addElement(new StringElement("<b>RCPT TO:</b> " + Arrays.asList(sentMessage.getAllRecipients())));Path 324:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage); www.itas.vn info@itas.vn .
  • 148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... www.itas.vn info@itas.vn .
  • 161. + Arrays.asList(sentMessage.getHeader("Message-ID"))));Path 325:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 163. ec.addElement(new StringElement("<b>Date:</b> " + sentMessage.getSentDate()));Path 326:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg; www.itas.vn info@itas.vn .
  • 94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, www.itas.vn info@itas.vn .
  • gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 165. ec.addElement(new StringElement("<b>Subject:</b> " + sentMessage.getSubject()));Path 327:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 199. ec.addElement(new StringElement("<b>Delivered-To:</b> " + to));Path 328:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 203. ec.addElement(new StringElement("for &lt;" + to + "&gt;; " + today));Path 329:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); www.itas.vn info@itas.vn .
  • ..... www.itas.vn info@itas.vn .
  • 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 205. ec.addElement(new StringElement("<b>To:</b> " + to));Path 330:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 209. ec.addElement(new StringElement("<b>Subject:</b> " + subject));Path 331:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 125. sendSimulatedMail(ec, to, subject, message);186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 212. ec.addElement(new StringElement(message));Path 332:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... www.itas.vn info@itas.vn .
  • 112. createMailMessage(s, subject, message, ec);220. private void createMailMessage(WebSession s, String subject, String message, ElementContainer ec) //UncheckedEmail.java ..... 275. ta.addElement(new StringElement(convertMetachars(message)));275. protected static String convertMetachars(String token) //Screen.java ..... 290. String replacedString = token; ..... 293. replacedString = replacedString.replaceAll(metaChar[mci], htmlCode[mci]); ..... 295. return (replacedString);220. private void createMailMessage(WebSession s, String subject, String message, ElementContainer ec) //UncheckedEmail.java ..... 275. ta.addElement(new StringElement(convertMetachars(message)));Path 333:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 262. t.addElement(makeRow(description, urlEncode(userInput), urlDecode(userInput)));745. public static String urlDecode(String str) //Encoding.java ..... 749. return (URLDecoder.decode(str, "UTF-8"));175. protected Element createContent(WebSession s) //Encoding.java ..... 262. t.addElement(makeRow(description, urlEncode(userInput), urlDecode(userInput)));604. private TR makeRow(String description, String value1, String value2) //Encoding.java ..... 612. .addElement(new Div().addElement(value2).setStyle("overflow:auto; height:60px; width:100px;")) 613. .setBgColor("#dddddd");Path 334:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name); www.itas.vn info@itas.vn .
  • 65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... www.itas.vn info@itas.vn .
  • 108. String param1 = s.getParser().getRawParameter("field1", "abc"); ..... 116. TextArea input1 = new TextArea("field1", 1, 25).addElement(param1);Path 335:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 109. String param2 = s.getParser().getRawParameter("field2", "123"); ..... 117. TextArea input2 = new TextArea("field2", 1, 25).addElement(param2);Path 336:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 110. String param3 = s.getParser().getRawParameter("field3", "abc 123 ABC"); ..... 118. TextArea input3 = new TextArea("field3", 1, 25).addElement(param3);Path 337:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 111. String param4 = s.getParser().getRawParameter("field4", "seven"); ..... 119. TextArea input4 = new TextArea("field4", 1, 25).addElement(param4);Path 338:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name); www.itas.vn info@itas.vn .
  • 65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 112. String param5 = s.getParser().getRawParameter("field5", "90210"); www.itas.vn info@itas.vn .
  • ..... 120. TextArea input5 = new TextArea("field5", 1, 25).addElement(param5);Path 339:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 113. String param6 = s.getParser().getRawParameter("field6", "90210-1111"); ..... 121. TextArea input6 = new TextArea("field6", 1, 25).addElement(param6);Path 340:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 114. String param7 = s.getParser().getRawParameter("field7", "301-604-4882"); ..... 122. TextArea input7 = new TextArea("field7", 1, 25).addElement(param7);Path 341:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString(); www.itas.vn info@itas.vn .
  • 186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 www.itas.vn info@itas.vn .
  • 3214 0002 1999")); ..... 228. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 342:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();186. protected ElementContainer createTotalTable(WebSession s) //ClientSideValidation.java ..... 192. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 233. Input input = new Input(Input.TEXT, "field1", param1); 234. input.setOnKeyUp("isValidCoupon(field1.value)"); 235. tr.addElement(new TD().addElement(input));Path 343:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); www.itas.vn info@itas.vn .
  • .....164. buf.append("&" + entity + ";"); www.itas.vn info@itas.vn .
  • ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 204. tr.addElement(new TD().addElement(String.valueOf(quantity1)).setAlign("center"));Path 344:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 204. tr.addElement(new TD().addElement(String.valueOf(quantity1)).setAlign("center")); ..... 215. tr.addElement(new TD().addElement(String.valueOf(quantity2)).setAlign("center"));Path 345:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name); www.itas.vn info@itas.vn .
  • 160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... www.itas.vn info@itas.vn .
  • 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 204. tr.addElement(new TD().addElement(String.valueOf(quantity1)).setAlign("center")); ..... 226. tr.addElement(new TD().addElement(String.valueOf(quantity3)).setAlign("center"));Path 346:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 173. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("CC", "5321 1337 8888 2007")); ..... 270. tr.addElement(new TD().addElement(new Input(Input.TEXT, "CC", param2)).setAlign("right")); www.itas.vn info@itas.vn .
  • www.itas.vn info@itas.vn .
  • Path 347:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);160. private ElementContainer createPurchaseContent(WebSession s, int quantity1, int quantity2, int quantity3, //ConcurrencyCart.java ..... 172. String param1 = s.getParser().getRawParameter("PAC", "111"); ..... 276. tr.addElement(new TD().addElement(new Input(Input.TEXT, "PAC", param1)).setAlign("right"));Path 348:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 193. Input input = new Input(Input.TEXT, INPUT, userInput); ..... 195. tr.addElement(new TD().addElement(input));Path 349:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 270. t.addElement(makeRow(description, rot13(userInput), rot13(userInput)));658. public static synchronized String rot13(String input) //Encoding.java ..... 665. char inChar = input.charAt(i); ..... 668. inChar += 13; ..... 671. inChar -= 26; ..... 682. output.append(inChar); ..... www.itas.vn info@itas.vn .
  • 685. return output.toString(); www.itas.vn info@itas.vn .
  • 175. protected Element createContent(WebSession s) //Encoding.java ..... 270. t.addElement(makeRow(description, rot13(userInput), rot13(userInput)));604. private TR makeRow(String description, String value1, String value2) //Encoding.java ..... 609. .addElement(new Div().addElement(value1).setStyle("overflow:auto; height:60px; width:100px;"))Path 350:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);175. protected Element createContent(WebSession s) //Encoding.java ..... 183. String userInput = s.getParser().getRawParameter(INPUT, ""); ..... 262. t.addElement(makeRow(description, urlEncode(userInput), urlDecode(userInput)));745. public static String urlDecode(String str) //Encoding.java ..... 749. return (URLDecoder.decode(str, "UTF-8"));175. protected Element createContent(WebSession s) //Encoding.java ..... 262. t.addElement(makeRow(description, urlEncode(userInput), urlDecode(userInput)));604. private TR makeRow(String description, String value1, String value2) //Encoding.java ..... 612. .addElement(new Div().addElement(value2).setStyle("overflow:auto; height:60px; width:100px;"))Path 351:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 108. String param1 = s.getParser().getRawParameter("field1", "abc"); ..... 116. TextArea input1 = new TextArea("field1", 1, 25).addElement(param1); ..... 130. ec.addElement(new Div().addElement(input1));Path 352:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 109. String param2 = s.getParser().getRawParameter("field2", "123"); ..... 117. TextArea input2 = new TextArea("field2", 1, 25).addElement(param2); ..... 133. ec.addElement(new Div().addElement(input2));Path 353:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 110. String param3 = s.getParser().getRawParameter("field3", "abc 123 ABC"); ..... 118. TextArea input3 = new TextArea("field3", 1, 25).addElement(param3); ..... 137. ec.addElement(new Div().addElement(input3));Path 354:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 111. String param4 = s.getParser().getRawParameter("field4", "seven"); ..... 119. TextArea input4 = new TextArea("field4", 1, 25).addElement(param4); ..... 140. ec.addElement(new Div().addElement(input4));Path 355:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 112. String param5 = s.getParser().getRawParameter("field5", "90210"); ..... www.itas.vn info@itas.vn .
  • 120. TextArea input5 = new TextArea("field5", 1, 25).addElement(param5);..... www.itas.vn info@itas.vn .
  • 143. ec.addElement(new Div().addElement(input5));Path 356:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 113. String param6 = s.getParser().getRawParameter("field6", "90210-1111"); ..... 121. TextArea input6 = new TextArea("field6", 1, 25).addElement(param6); ..... 147. ec.addElement(new Div().addElement(input6));Path 357:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //JavaScriptValidation.java ..... 114. String param7 = s.getParser().getRawParameter("field7", "301-604-4882"); ..... 122. TextArea input7 = new TextArea("field7", 1, 25).addElement(param7); ..... 151. ec.addElement(new Div().addElement(input7));Path 358:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 76. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... www.itas.vn info@itas.vn .
  • 168. return buf.toString();66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 76. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 183. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2)));Path 359:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);66. protected Element createContent(WebSession s) //ReflectedXSS.java ..... 75. String param1 = s.getParser().getRawParameter("field1", "111"); ..... 187. tr.addElement(new TD().addElement("<input name=field1 type=TEXT value=" + param1 + ">"));Path 360:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 75. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999"));140. public static String encode(String s1) //HtmlEncoder.java ..... 147. char ch = s1.charAt(i); ..... 149. String entity = i2e.get(new Integer((int) ch)); ..... 164. buf.append("&" + entity + ";"); ..... 168. return buf.toString();65. protected Element createContent(WebSession s) //TraceXSS.java ..... 75. String param2 = HtmlEncoder.encode(s.getParser().getRawParameter("field2", "4128 3214 0002 1999")); ..... 180. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field2", param2))); www.itas.vn info@itas.vn .
  • Path 361:Query Name - Reflected XSS All Clients www.itas.vn info@itas.vn .
  • Severity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);65. protected Element createContent(WebSession s) //TraceXSS.java ..... 74. String param1 = s.getParser().getRawParameter("field1", "111"); ..... 184. tr.addElement(new TD().addElement(new Input(Input.TEXT, "field1", param1)));Path 362:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 104. String subject = s.getParser().getRawParameter(SUBJECT, ""); ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass);330. private Message sendGoogleMail(String recipients, String subject, String message, String from, //UncheckedEmail.java ..... 367. msg.setSubject(subject); ..... 371. return msg;94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 120. Message sentMessage = sendGoogleMail(to, subject, message, emailFromAddress, gId, gPass); 121. formatMail(ec, sentMessage);148. private void formatMail(ElementContainer ec, Message sentMessage) //UncheckedEmail.java ..... 153. + Arrays.asList(sentMessage.getAllRecipients()))));Path 363:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 100. String to = s.getParser().getRawParameter(HIDDEN_TO, ""); ..... 125. sendSimulatedMail(ec, to, subject, message); www.itas.vn info@itas.vn .
  • 186. private void sendSimulatedMail(ElementContainer ec, String to, String subject, String message) //UncheckedEmail.java ..... 195. ec.addElement(new Center().addElement(new B().addElement("You sent the following message to: " + to)));Path 364:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);94. protected Element createContent(WebSession s) //UncheckedEmail.java ..... 103. String message = s.getParser().getRawParameter(MESSAGE, ""); ..... 112. createMailMessage(s, subject, message, ec);220. private void createMailMessage(WebSession s, String subject, String message, ElementContainer ec) //UncheckedEmail.java ..... 275. ta.addElement(new StringElement(convertMetachars(message)));275. protected static String convertMetachars(String token) //Screen.java ..... 290. String replacedString = token; ..... 293. replacedString = replacedString.replaceAll(metaChar[mci], htmlCode[mci]); ..... 295. return (replacedString);220. private void createMailMessage(WebSession s, String subject, String message, ElementContainer ec) //UncheckedEmail.java ..... 275. ta.addElement(new StringElement(convertMetachars(message))); 276. tr.addElement(new TD().setAlign("LEFT").addElement(ta).setColSpan(2));Path 365:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);81. protected Element createContent(WebSession s) //XPATHInjection.java ..... 124. String username = s.getParser().getRawParameter(USERNAME, ""); ..... 143. String expression = "/employees/employee[loginID/text()=" + username + " and passwd/text()=" + password ..... 145. nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET); ..... www.itas.vn info@itas.vn .
  • 162. Node node = nodes.item(i); www.itas.vn info@itas.vn .
  • 163. String[] arrTokens = node.getTextContent().split("[tsn]+"); ..... 166. tr.addElement(new TD().addElement(arrTokens[1]));Path 366:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);81. protected Element createContent(WebSession s) //XPATHInjection.java ..... 124. String username = s.getParser().getRawParameter(USERNAME, ""); ..... 143. String expression = "/employees/employee[loginID/text()=" + username + " and passwd/text()=" + password ..... 145. nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET); ..... 162. Node node = nodes.item(i); 163. String[] arrTokens = node.getTextContent().split("[tsn]+"); ..... 167. tr.addElement(new TD().addElement(arrTokens[2]));Path 367:Query Name - Reflected XSS All ClientsSeverity - High593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);81. protected Element createContent(WebSession s) //XPATHInjection.java ..... 124. String username = s.getParser().getRawParameter(USERNAME, ""); ..... 143. String expression = "/employees/employee[loginID/text()=" + username + " and passwd/text()=" + password ..... 145. nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET); ..... 162. Node node = nodes.item(i); 163. String[] arrTokens = node.getTextContent().split("[tsn]+"); ..... 168. tr.addElement(new TD().addElement(arrTokens[4])); www.itas.vn info@itas.vn .
  • Improper Sanitization of Special Elements used in an SQL Command (SQL Injection)Weakness ID: 89 (Weakness Base) Status: DrafDescriptionDescription Summary The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not sanitize or incorrectly sanitizes special elements that could modify the intended SQL command when it is sent to a downstream component.Extended Description Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data. This can be used to alter query logic to bypass security checks, or to insert additional statements that modify the back-end database, possibly including execution of system commands. SQL injection has become a common issue with database-driven web sites. The flaw is easily detected, and easily exploited, and as such, any site or software package with even a minimal user base is likely to be subject to an attempted attack of this kind. This flaw depends on the fact that SQL makes no real distinction between the control and data planes.Time of Introduction l Architecture and Design l Implementation l OperationApplicable PlatformsLanguages AllTechnology Classes Database-ServerModes of IntroductionThis weakness typically appears in data-rich applications that save user inputs in a database.Common ConsequencesScope EffectConfidentiality Since SQL databases generally hold sensitive data, loss of confidentiality is a frequent problem with SQL injection vulnerabilities.Authentication If poor SQL commands are used to check user names and passwords, it may be possible to connect to a system as another user with no previous knowledge of the password.Authorization If authorization information is held in a SQL database, it may be possible to change this information through the successful exploitation of a SQL injection vulnerability.Integrity Just as it may be possible to read sensitive information, it is also possible to make changes or even delete this information with a SQL injection attack.Likelihood of Exploit Very HighEnabling Factors for ExploitationThe application dynamically generates queries that contain user input.Detection MethodsAutomated Static AnalysisThis weakness can often be detected using automated static analysis tools. Many modern tools use data flow analysis orconstraint-based techniques to minimize the number of false positives.Automated static analysis might not be able to recognize when proper input validation is being performed, leading tofalse positives - i.e., warnings that do not have any security consequences or do not require any code changes.Automated static analysis might not be able to detect the usage of custom API functions or third-party libraries thatindirectly invoke SQL commands, leading to false negatives - especially if the API/library code is not available foranalysis.Manual AnalysisManual analysis can be useful for finding this weakness, but it might not achieve desired code coverage within limitedtime constraints. This becomes difficult for weaknesses that must be considered for all inputs, since the attack surface www.itas.vn info@itas.vn .
  • can be too large.Demonstrative ExamplesExample 1In 2008, a large number of web servers were compromised using the same SQL injection attack string. This single stringworked against many different programs. The SQL injection was then used to modify the web sites to serve maliciouscode. [1]Example 2The following code dynamically constructs and executes a SQL query that searches for items matching a specified name.The query restricts the items displayed to those where owner matches the user name of the currently-authenticated user. www.itas.vn info@itas.vn .
  • (Bad Code) Example Language: C# ... string userName = ctx.getAuthenticatedUserName(); string query = "SELECT * FROM items WHERE owner = " + userName + " AND itemname = " + ItemName.Text + ""; sda = new SqlDataAdapter(query, conn); DataTable dt = new DataTable(); sda.Fill(dt); ...The query that this code intends to execute follows: SELECT * FROM items WHERE owner = <userName AND itemname = <itemName;However, because the query is constructed dynamically by concatenating a constant base query string and a user inputstring, the query only behaves correctly if itemName does not contain a single-quote character. If an attacker with the username wiley enters the string: (Attack) name OR a=afor itemName, then the query becomes the following: (Attack) SELECT * FROM items WHERE owner = wiley AND itemname = name OR a=a;The addition of the: (Attack) OR a=acondition causes the WHERE clause to always evaluate to true, so the query becomes logically equivalent to the muchsimpler query: (Attack) SELECT * FROM items;This simplification of the query allows the attacker to bypass the requirement that the query only return items owned bythe authenticated user; the query now returns all entries stored in the items table, regardless of their specified owner.Example 3This example examines the effects of a different malicious value passed to the query constructed and executed in theprevious example.If an attacker with the user name wiley enters the string: (Attack) name; DELETE FROM items; --for itemName, then the query becomes the following two queries: (Attack) Example Language: SQL SELECT * FROM items WHERE owner = wiley AND itemname = name; DELETE FROM items; --Many database servers, including Microsoft(R) SQL Server 2000, allow multiple SQL statements separated by semicolons tobe executed at once. While this attack string results in an error on Oracle and other database servers that do not allowthe batch-execution of statements separated by semicolons, on databases that do allow batch execution, this type ofattack allows the attacker to execute arbitrary commands against the database.Notice the trailing pair of hyphens (--), which specifies to most database servers that the remainder of the statement is tobe treated as a comment and not executed. In this case the comment character serves to remove the trailing single-quoteleft over from the modified query. On a database where comments are not allowed to be used in this way, the generalattack could still be made effective using a trick similar to the one shown in the previous example. www.itas.vn info@itas.vn .
  • If an attacker enters the string (Attack) name; DELETE FROM items; SELECT * FROM items WHERE a=aThen the following three valid statements will be created: (Attack) SELECT * FROM items WHERE owner = wiley AND itemname = name; www.itas.vn info@itas.vn .
  • DELETE FROM items; SELECT * FROM items WHERE a=a;One traditional approach to preventing SQL injection attacks is to handle them as an input validation problem and eitheraccept only characters from a whitelist of safe values or identify and escape a blacklist of potentially malicious values.Whitelisting can be a very effective means of enforcing strict input validation rules, but parameterized SQL statementsrequire less maintenance and can offer more guarantees with respect to security. As is almost always the case,blacklisting is riddled with loopholes that make it ineffective at preventing SQL injection attacks. For example, attackerscan: l Target fields that are not quoted l Find ways to bypass the need for certain escaped meta-characters l Use stored procedures to hide the injected meta-characters.Manually escaping characters in input to SQL queries can help, but it will not make your application secure from SQLinjection attacks.Another solution commonly proposed for dealing with SQL injection attacks is to use stored procedures. Although storedprocedures prevent some types of SQL injection attacks, they fail to protect against many others. For example, thefollowing PL/SQL procedure is vulnerable to the same SQL injection attack shown in the first example. (Bad Code) procedure get_item ( itm_cv IN OUT ItmCurTyp, usr in varchar2, itm in varchar2) is open itm_cv for SELECT * FROM items WHERE || owner = || usr || AND itemname = || itm || ; end get_item;Stored procedures typically help prevent SQL injection attacks by limiting the types of statements that can be passed totheir parameters. However, there are many ways around the limitations and many interesting statements that can still bepassed to stored procedures. Again, stored procedures can prevent some exploits, but they will not make your applicationsecure against SQL injection attacks.Example 4MS SQL has a built in function that enables shell command execution. An SQL injection in such a context could bedisastrous. For example, a query of the form: (Bad Code) SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY=$user_input ORDER BY PRICEWhere $user_input is taken from the user and unfiltered.If the user provides the string: (Attack) exec master..xp_cmdshell vol --The query will take the following form: " (Attack) SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY= exec master..xp_cmdshell vol -- ORDER BY PRICENow, this query can be broken down into: l [1] a first SQL query: SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY= l [2] a second SQL query, which executes a shell command: exec master..xp_cmdshell vol l [3] an MS SQL comment: -- ORDER BY PRICEAs can be seen, the malicious input changes the semantics of the query into a query, a shell command execution and acomment.Example 5This code intends to print a message summary given the message ID. (Bad Code) Example Language: PHP $id = $_COOKIE["mid"]; mysql_query("SELECT MessageID, Subject FROM messages WHERE MessageID = $id"); www.itas.vn info@itas.vn .
  • The programmer may have skipped any input validation on $id under the assumption that attackers cannot modify thecookie. However, this is easy to do with custom client code or even in the web browser.While $id is wrapped in single quotes in the call to mysql_query(), an attacker could simply change the incoming midcookie to: (Attack) 1432 or 1 = 1This would produce the resulting query: www.itas.vn info@itas.vn . (Result)
  • SELECT MessageID, Subject FROM messages WHERE MessageID = 1432 or 1 = 1Not only will this retrieve message number 1432, it will retrieve all other messages.In this case, the programmer could apply a simple modification to the code to eliminate the SQL injection: (Good Code) Example Language: PHP $id = intval($_COOKIE["mid"]); mysql_query("SELECT MessageID, Subject FROM messages WHERE MessageID = $id");However, if this code is intended to support multiple users with different message boxes, the code might also need anaccess control check (CWE-285) to ensure that the application user has the permission to see that message.Example 6This example attempts to take a last name provided by a user and enter it into a database. (Bad Code) Example Language: Perl $userKey = getUserID(); $name = getUserInput(); # ensure only letters, hyphens and apostrophe are allowed $name = whiteList($name, "^a-zA-z-$"); $query = "INSERT INTO last_names VALUES($userKey, $name)";While the programmer applies a whitelist to the user input, it has shortcomings. First of all, the user is still allowed toprovide hyphens which are used as comment structures in SQL. If a user specifies -- then the remainder of the statementwill be treated as a comment, which may bypass security logic. Furthermore, the whitelist permits the apostrophe which isalso a data / command separator in SQL. If a user supplies a name with an apostrophe, they may be able to alter thestructure of the whole statement and even change control flow of the program, possibly accessing or modifying confidentialinformation. In this situation, both the hyphen and apostrophe are legitimate characters for a last name and permittingthem is required. Instead, a programmer may want to use a prepared statement or apply an encoding routine to the inputto prevent any data / directive misinterpretations.Observed ExamplesReference DescriptionCVE -2004 -0366 chain: SQL injection in library intended for database authentication allows SQL injection and authentication bypass.CVE -2008 -2790 SQL injection through an ID that was supposed to be numeric.CVE -2008 -2223 SQL injection through an ID that was supposed to be numeric.CVE -2007 -6602 SQL injection via user name.CVE -2008 -5817 SQL injection via user name or password fields.CVE -2003 -0377 SQL injection in security product, using a crafted group name.CVE -2008 -2380 SQL injection in authentication library.Potential MitigationsPhase: Architecture and DesignStrategy: Libraries or FrameworksUse a vetted library or framework that does not allow this weakness to occur or provides constructs that make thisweakness easier to avoid.For example, consider using persistence layers such as Hibernate or Enterprise Java Beans, which can provide significantprotection against SQL injection if used properly.Phase: Architecture and DesignStrategy: ParameterizationIf available, use structured mechanisms that automatically enforce the separation between data and code. Thesemechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying onthe developer to provide this capability at every point where output is generated.Process SQL queries using prepared statements, parameterized queries, or stored procedures. These features shouldaccept parameters or variables and support strong typing. Do not dynamically construct and execute query strings withinthese features using "exec" or similar functionality, since you may re-introduce the possibility of SQL injection.Phase: Architecture and DesignFollow the principle of least privilege when creating user accounts to a SQL database. The database users should onlyhave the minimum privileges necessary to use their account. If the requirements of the system indicate that a user canread and modify their own data, then limit their privileges so they cannot read/write others data. Use the strictestpermissions possible on all database objects, such as execute-only for stored procedures. www.itas.vn info@itas.vn .
  • Phase: Architecture and DesignFor any security checks that are performed on the client side, ensure that these checks are duplicated on the server side,in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have beenperformed, or by changing the client to remove the client-side checks entirely. Then, these modified values would besubmitted to the server.Phase: ImplementationIf you need to use dynamically-generated query strings in spite of the risk, use proper encoding and escaping of inputs.Instead of building your own implementation, such features may be available in the database or programming language. www.itas.vn info@itas.vn .
  • For example, the Oracle DBMS_ASSERT package can check or enforce that parameters have certain properties that makethem less vulnerable to SQL injection. For MySQL, the mysql_real_escape_string() API function is available in both C andPHP.Phase: ImplementationStrategy: Input ValidationAssume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a whitelist of acceptableinputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, ortransform it into something that does. Do not rely exclusively on looking for malicious or malformed inputs (i.e., do notrely on a blacklist). However, blacklists can be useful for detecting potential attacks or determining which inputs are somalformed that they should be rejected outright.When performing input validation, consider all potentially relevant properties, including length, type of input, the fullrange of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance tobusiness rules. As an example of business rule logic, "boat" may be syntactically valid because it only containsalphanumeric characters, but it is not valid if you are expecting colors such as "red" or "blue."When constructing SQL query strings, use stringent whitelists that limit the character set based on the expected value ofthe parameter in the request. This will indirectly limit the scope of an attack, but this technique is less important thanproper output encoding and escaping.Note that proper output encoding, escaping, and quoting is the most effective solution for preventing SQL injection,although input validation may provide some defense-in-depth. This is because it effectively limits what will appear inoutput. Input validation will not always prevent SQL injection, especially if you are required to support free-form textfields that could contain arbitrary characters. For example, the name "OReilly" would likely pass the validation step, sinceit is a common last name in the English language. However, it cannot be directly inserted into the database because itcontains the "" apostrophe character, which would need to be escaped or otherwise handled. In this case, stripping theapostrophe might reduce the risk of SQL injection, but it would produce incorrect behavior because the wrong name wouldbe recorded.When feasible, it may be safest to disallow meta-characters entirely, instead of escaping them. This will provide somedefense in depth. After the data is entered into the database, later processes may neglect to escape meta-charactersbefore use, and you may not have control over those processes.Phases: Testing; ImplementationUse automated static analysis tools that target this type of weakness. Many modern techniques use data flow analysis tominimize the number of false positives. This is not a perfect solution, since 100% accuracy and coverage are not feasible.Phase: TestingUse dynamic tools and techniques that interact with the software using large test suites with many diverse inputs, suchas fuzz testing (fuzzing), robustness testing, and fault injection. The softwares operation may slow down, but it shouldnot become unstable, crash, or generate incorrect results.Phase: OperationUse an application firewall that can detect attacks against this weakness. This might not catch all attacks, and it mightrequire some effort for customization. However, it can be beneficial in cases in which the code cannot be fixed (because itis controlled by a third party), as an emergency prevention measure while more comprehensive software assurancemeasures are applied, or to provide defense in depth.RelationshipsNature Type ID NameChildOf 20 Improper Input Validation 700ChildOf 77 Improper Sanitization of Special Elements used in a Command (Command Injection) 699 1000ChildOf 713 OWASP Top Ten 2007 Category A2 - Injection Flaws 629ChildOf 722 OWASP Top Ten 2004 Category A1 - Unvalidated Input 711ChildOf 727 OWASP Top Ten 2004 Category A6 - Injection Flaws 711ChildOf 751 2009 Top 25 - Insecure Interaction Between Components 750ChildOf 801 2010 Top 25 - Insecure Interaction Between Components 800ParentOf 564 SQL Injection: Hibernate 699 1000MemberOf 630 Weaknesses Examined by SAMATE 630MemberOf 635 Weaknesses Used by NVD 635CanFollow 456 Missing Initialization 1000Relationship NotesSQL injection can be resultant from special character mismanagement, MAID, or blacklist/whitelist problems. It can beprimary to authentication errors.Taxonomy Mappings www.itas.vn info@itas.vn .
  • Mapped Taxonomy Name Node ID Fit Mapped Node NamePLOVER SQL injection7 Pernicious Kingdoms SQL InjectionCLASP SQL injectionOWASP Top Ten 2007 A2 CWE More Specific Injection FlawsOWASP Top Ten 2004 A1 CWE More Specific Unvalidated InputOWASP Top Ten 2004 A6 CWE More Specific Injection FlawsWASC 19 SQL InjectionRelated Attack Patterns www.itas.vn info@itas.vn .
  • CAPEC-ID Attack Pattern Name (CAPEC Version: 1.5)7 Blind SQL Injection66 SQL Injection108 Command Line Execution through SQL Injection109 Object Relational Mapping Injection110 SQL Injection through SOAP Parameter TamperingWhite Box DefinitionsA weakness where the code path has: 1. start statement that accepts input and 2. end statement that performs an SQL command where a. the input is part of the SQL command and b. input contains SQL syntax (esp. query separator)References[REF-17] Michael Howard, David LeBlanc and John Viega. "24 Deadly Sins of Software Security". "Sin 1: SQL Injection."Page 3. McGraw-Hill. 2010.[REF-11] M. Howard and D. LeBlanc. "Writing Secure Code". Chapter 12, "Database Input Issues" Page 397. 2nd Edition.Microsoft. 2002.OWASP. "SQL Injection Prevention Cheat Sheet".<http://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet.Steven Friedl. "SQL Injection Attacks by Example". 2007-10-10. <http://www.unixwiz.net/techtips/sql-injection.html.Ferruh Mavituna. "SQL Injection Cheat Sheet". 2007-03-15. <http://ferruh.mavituna.com/sql-injection-cheatsheet-oku/.David Litchfield, Chris Anley, John Heasman and Bill Grindlay. "The Database Hackers Handbook: Defending DatabaseServers". Wiley. 2005-07-14.David Litchfield. "The Oracle Hackers Handbook: Hacking and Defending Oracle". Wiley. 2007-01-30.Microsoft. "SQL Injection". December 2008. <http://msdn.microsoft.com/en-us/library/ms161953.aspx.Microsoft Security Vulnerability Research & Defense. "SQL Injection Attack".<http://blogs.technet.com/swi/archive/2008/05/29/sql-injection-attack.aspx.Michael Howard. "Giving SQL Injection the Respect it Deserves". 2008-05-15.<http://blogs.msdn.com/sdl/archive/2008/05/15/giving-sql-injection-the-respect-it-deserves.aspx.Content HistorySubmissionsSubmission Date Submitter Organization Source PLOVER Externally Mined 7 Pernicious Kingdoms Externally Mined CLASP Externally MinedModificationsModification Date Modifier Organization Source2008-07-01 Eric Dalci Cigital External updated Time of Introduction2008-08-01 KDM Analytics External added/updated white box definitions2008-08-15 Veracode External Suggested OWASP Top Ten 2004 mapping2008-09-08 CWE Content Team MITRE Internal updated Applicable Platforms, Common Consequences, Modes of Introduction, Name, Relationships, Other Notes, Relationship Notes, Taxonomy Mappings2008-10-14 CWE Content Team MITRE Internal updated Description2008-11-24 CWE Content Team MITRE Internal updated Observed Examples2009-01-12 CWE Content Team MITRE Internal updated Demonstrative Examples, Description, Enabling Factors for Exploitation, Modes of Introduction, Name, Observed Examples, Other Notes, Potential Mitigations, References, Relationships2009-03-10 CWE Content Team MITRE Internal updated Potential Mitigations2009-05-27 CWE Content Team MITRE Internal updated Demonstrative Examples, Name, Related Attack Patterns www.itas.vn info@itas.vn .
  • 2009-07-17 KDM Analytics External Improved the White Box Definition2009-07-27 CWE Content Team MITRE Internal updated Description, Name, White Box Definitions2009-12-28 CWE Content Team MITRE Internal updated Potential Mitigations2010-02-16 CWE Content Team MITRE Internal updated Demonstrative Examples, Detection Factors, Potential Mitigations, References, Relationships, Taxonomy Mappings2010-04-05 CWE Content Team MITRE Internal updated Demonstrative Examples, Potential MitigationsPrevious Entry Names www.itas.vn info@itas.vn .
  • Change Date Previous Entry Name2008-04-11 SQL Injection2008-09-09 Failure to Sanitize Data into SQL Queries (aka SQL Injection)2009-01-12 Failure to Sanitize Data within SQL Queries (aka SQL Injection)2009-05-27 Failure to Preserve SQL Query Structure (aka SQL Injection)2009 -07 -27 Failure to Preserve SQL Query Structure (SQL Injection) BACK TO TOP www.itas.vn info@itas.vn .
  • Path 1:Query Name - SQL injectionSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);123. protected Element concept1(WebSession s) throws Exception //BackDoors.java ..... 131. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 134. userInput = SELECT_ST + userInput; 135. String[] arrSQL = userInput.split(";"); ..... 141. statement.executeUpdate(arrSQL[1]);Path 2:Query Name - SQL injectionSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);123. protected Element concept1(WebSession s) throws Exception //BackDoors.java ..... 131. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 134. userInput = SELECT_ST + userInput; 135. String[] arrSQL = userInput.split(";"); ..... 148. ResultSet rs = statement.executeQuery(arrSQL[0]);Path 3:Query Name - SQL injectionSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException www.itas.vn info@itas.vn .
  • //ParameterParser.java.....615. String[] values = request.getParameterValues(name); www.itas.vn info@itas.vn .
  • ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);159. protected Element concept2(WebSession s) throws Exception //BackDoors.java ..... 164. String userInput = s.getParser().getRawParameter(USERNAME, ""); ..... 166. if (!userInput.equals("")) ..... 168. userInput = SELECT_ST + userInput; 169. String[] arrSQL = userInput.split(";"); ..... 180. ResultSet rs = statement.executeQuery(arrSQL[0]);Path 4:Query Name - SQL injectionSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);70. protected Element createContent(WebSession s) //BlindNumericSqlInjection.java ..... 80. String accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101"); 81. Input input = new Input(Input.TEXT, ACCT_NUM, accountNumber.toString()); ..... 87. String query = "SELECT * FROM user_data WHERE userid = " + accountNumber; ..... 114. ResultSet results = statement.executeQuery(query);Path 5:Query Name - SQL injectionSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]); www.itas.vn info@itas.vn .
  • 593. public String getRawParameter(String name, String def) //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 597. return getRawParameter(name);70. protected Element createContent(WebSession s) //BlindStringSqlInjection.java ..... 80. String accountNumber = s.getParser().getRawParameter(ACCT_NUM, "101"); 81. Input input = new Input(Input.TEXT, ACCT_NUM, accountNumber.toString()); ..... 87. String query = "SELECT * FROM user_data WHERE userid = " + accountNumber; ..... 114. ResultSet results = statement.executeQuery(query);Path 6:Query Name - SQL injectionSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);77. protected Element createContent(WebSession s) //DOS_Login.java ..... 86. password = s.getParser().getRawParameter(PASSWORD); ..... 99. + password + ""; ..... 106. ResultSet results = statement.executeQuery(query);Path 7:Query Name - SQL injectionSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);77. protected Element createContent(WebSession s) //DOS_Login.java ..... 85. username = s.getParser().getRawParameter(USERNAME); ..... 89. if (username.equals("jeff") || username.equals("dave")) ..... 120. String insertData1 = "INSERT INTO user_login VALUES ( " + username + ", " ..... 122. statement.executeUpdate(insertData1);Path 8: www.itas.vn info@itas.vn .
  • Query Name - SQL injectionSeverity - High www.itas.vn info@itas.vn .
  • 613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);143. protected Element makeAccountLine(WebSession s) //SqlAddData.java ..... 148. userid = s.getParser().getRawParameter(USERID, "jsmith");71. protected Element createContent(WebSession s) //SqlAddData.java ..... 79. ec.addElement(makeAccountLine(s)); ..... 81. String query = "SELECT * FROM salaries WHERE userid = " + userid + ""; ..... 100. statement.execute(query);Path 9:Query Name - SQL injectionSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);161. protected Element makeAccountLine(WebSession s) //SqlModifyData.java ..... 166. userid = s.getParser().getRawParameter(USERID, "jsmith"); 167. Input input = new Input(Input.TEXT, USERID, userid.toString());74. protected Element createContent(WebSession s) //SqlModifyData.java ..... 82. ec.addElement(makeAccountLine(s)); ..... 84. String query = "SELECT * FROM salaries WHERE userid = " + userid + ""; ..... 108. statement.execute(query);Path 10:Query Name - SQL injectionSeverity - High www.itas.vn info@itas.vn .
  • 613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... www.itas.vn info@itas.vn .
  • 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);87. protected Element injectableQuery(WebSession s) //SqlNumericInjection.java ..... 98. station = s.getParser().getRawParameter(STATION_ID, null); ..... 106. query = "SELECT * FROM weather_data WHERE station = " + station; ..... 119. ResultSet results = statement.executeQuery(query);Path 11:Query Name - SQL injectionSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java ..... 597. return getRawParameter(name);198. protected Element makeAccountLine(WebSession s) //SqlStringInjection.java ..... 203. accountName = s.getParser().getRawParameter(ACCT_NAME, "Your Name");84. protected Element injectableQuery(WebSession s) //SqlStringInjection.java ..... 92. ec.addElement(makeAccountLine(s)); ..... 94. String query = "SELECT * FROM user_data WHERE last_name = " + accountName + ""; ..... 101. ResultSet results = statement.executeQuery(query);Path 12:Query Name - SQL injectionSeverity - High613. public String getRawParameter(String name) throws ParameterNotFoundException //ParameterParser.java ..... 615. String[] values = request.getParameterValues(name); ..... 623. return (values[0]);593. public String getRawParameter(String name, String def) //ParameterParser.java www.itas.vn info@itas.vn .
  • ..... www.itas.vn info@itas.vn .
  • 597. return getRawParameter(name);70. protected Element createContent(WebSession s) //ThreadSafetyProblem.java ..... 80. currentUser = s.ge