<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Iberiam</id>
		<title>OWASP - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Iberiam"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Iberiam"/>
		<updated>2026-05-27T07:28:38Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=206682</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=206682"/>
				<updated>2016-01-17T04:20:38Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
*02.Out.2015 - A new version of WAP is available - WAP v2.0.2&amp;lt;br/&amp;gt;&lt;br /&gt;
*WAP in Instituto Federal Catarinense, Blumenau, Brasil&amp;lt;br/&amp;gt;&lt;br /&gt;
*WAP in Universidade Federal do Amazonas, Manaus, Brasil&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
WAP in Instituto Federal Catarinense, Blumenau, Brasil&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Protection of Web Applications with the WAP Tool'''''. Aug 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WAP in Universidade Federal do Amazonas, Manaus, Brasil&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Protection of Web Applications with Data Mining to Detect False Positives'''''. Jul 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&lt;br /&gt;
* Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&lt;br /&gt;
* Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&lt;br /&gt;
* Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Detecting and Removing Web Application Vulnerabilities with Static Analysis and Data Mining'''''.  IEEE Transactions on Reliability, July 2015. ([http://awap.sourceforge.net/papers/WAP_IEEE_TR_2015.pdf journal])&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Web Application Protection with the WAP tool''''' (fast abstract). Proceedings of the 44th IEEE/IFIP International Conference on Dependable Systems and Networks (DSN'14), Atlanta, Georgia USA, June 2014. ([http://awap.sourceforge.net/papers/DSN14-fa.pdf paper])&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positives'''''. Proceedings of the 23rd International Conference on World Wide Web (WWW), Seoul, Korea, 11 pages, April 2014. ([http://awap.sourceforge.net/papers/WWW14.pdf paper]) &lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. Proceedings of the IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany, 6 pages, July 2013. ([http://awap.sourceforge.net/papers/INDIN13.pdf paper])&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Appendix_A:_Testing_Tools&amp;diff=206590</id>
		<title>Appendix A: Testing Tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Appendix_A:_Testing_Tools&amp;diff=206590"/>
				<updated>2016-01-16T18:35:00Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Open Source / Freeware */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
==Open Source Black Box Testing tools==&lt;br /&gt;
&lt;br /&gt;
=== General Testing ===&lt;br /&gt;
* '''[https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project OWASP ZAP]'''&lt;br /&gt;
**The Zed Attack Proxy (ZAP) is an easy to use integrated penetration testing tool for finding vulnerabilities in web applications. It is designed to be used by people with a wide range of security experience and as such is ideal for developers and functional testers who are new to penetration testing.&lt;br /&gt;
**ZAP provides automated scanners as well as a set of tools that allow you to find security vulnerabilities manually.&lt;br /&gt;
* '''[[OWASP_WebScarab_Project|OWASP WebScarab]]'''&lt;br /&gt;
** WebScarab is a framework for analysing applications that communicate using the HTTP and HTTPS protocols. It is written in Java, and is portable to many platforms. WebScarab has several modes of operation that are implemented by a number of plugins.&lt;br /&gt;
* '''[[OWASP_CAL9000_Project|OWASP CAL9000]]'''&lt;br /&gt;
** CAL9000 is a collection of browser-based tools that enable more effective and efficient manual testing efforts.&lt;br /&gt;
** Includes an XSS Attack Library, Character Encoder/Decoder, HTTP Request Generator and Response Evaluator, Testing Checklist, Automated Attack Editor and much more.&lt;br /&gt;
*  '''[[:Category:OWASP Pantera Web Assessment Studio Project|OWASP Pantera Web Assessment Studio Project]]'''&lt;br /&gt;
** Pantera uses an improved version of SpikeProxy to provide a powerful web application analysis engine. The primary goal of Pantera is to combine automated capabilities with complete manual testing to get the best penetration testing results.&lt;br /&gt;
* '''[[:OWASP Mantra - Security Framework]]'''&lt;br /&gt;
**Mantra is a web application security testing framework built on top of a browser. It supports Windows, Linux(both 32 and 64 bit) and Macintosh. In addition, it can work with other software like ZAP using built in proxy management function which makes it much more convenient. Mantra is available in 9 languages: Arabic, Chinese - Simplified, Chinese - Traditional, English, French, Portuguese, Russian, Spanish and Turkish.&lt;br /&gt;
* '''SPIKE''' - http://www.immunitysec.com/resources-freesoftware.shtml&lt;br /&gt;
** SPIKE designed to analyze new network protocols for buffer overflows or similar weaknesses. It requires a strong knowledge of C to use and only available for the Linux platform.&lt;br /&gt;
* '''Burp Proxy''' - http://www.portswigger.net/Burp/&lt;br /&gt;
** Burp Proxy is an intercepting proxy server for security testing of web applications it allows Intercepting and modifying all HTTP(S) traffic passing in both directions, it can work with custom SSL certificates and non-proxy-aware clients.&lt;br /&gt;
* '''Odysseus Proxy''' - http://www.wastelands.gen.nz/odysseus/&lt;br /&gt;
** Odysseus is a proxy server, which acts as a man-in-the-middle during an HTTP session. A typical HTTP proxy will relay packets to and from a client browser and a web server. It will intercept an HTTP session's data in either direction.&lt;br /&gt;
* '''Webstretch Proxy''' - http://sourceforge.net/projects/webstretch&lt;br /&gt;
** Webstretch Proxy enable users to view and alter all aspects of communications with a web site via a proxy. It can also be used for debugging during development. &lt;br /&gt;
*  '''WATOBO''' - http://sourceforge.net/apps/mediawiki/watobo/index.php?title=Main_Page&lt;br /&gt;
** WATOBO works like a local proxy, similar to Webscarab, ZAP or BurpSuite and it supports passive and active checks.&lt;br /&gt;
* '''Firefox LiveHTTPHeaders''' - https://addons.mozilla.org/en-US/firefox/addon/live-http-headers/&lt;br /&gt;
** View HTTP headers of a page and while browsing.&lt;br /&gt;
* '''Firefox Tamper Data''' - https://addons.mozilla.org/en-US/firefox/addon/tamper-data/&lt;br /&gt;
** Use tamperdata to view and modify HTTP/HTTPS headers and post parameters&lt;br /&gt;
* '''Firefox Web Developer Tools''' - https://addons.mozilla.org/en-US/firefox/addon/web-developer/&lt;br /&gt;
** The Web Developer extension adds various web developer tools to the browser.&lt;br /&gt;
* '''DOM Inspector''' - https://developer.mozilla.org/en/docs/DOM_Inspector&lt;br /&gt;
**  DOM Inspector is a developer tool used to inspect, browse, and edit the Document Object Model (DOM)&lt;br /&gt;
* '''Firefox Firebug''' - http://getfirebug.com/&lt;br /&gt;
** Firebug integrates with Firefox to edit, debug, and monitor CSS, HTML, and JavaScript.&lt;br /&gt;
* '''Grendel-Scan''' - http://securitytube-tools.net/index.php?title=Grendel_Scan&lt;br /&gt;
** Grendel-Scan is an automated security scanning of web applications and also supports manual penetration testing.&lt;br /&gt;
*  '''OWASP SWFIntruder''' - http://www.mindedsecurity.com/swfintruder.html&lt;br /&gt;
** SWFIntruder (pronounced Swiff Intruder) is the first tool specifically developed for analyzing and testing security of Flash applications at runtime.&lt;br /&gt;
* '''SWFScan''' - http://h30499.www3.hp.com/t5/Following-the-Wh1t3-Rabbit/SWFScan-FREE-Flash-decompiler/ba-p/5440167 &lt;br /&gt;
** Flash decompiler&lt;br /&gt;
*  '''Wikto''' - http://www.sensepost.com/labs/tools/pentest/wikto&lt;br /&gt;
** Wikto features including fuzzy logic error code checking, a back-end miner, Google-assisted directory mining and real time HTTP request/response monitoring.&lt;br /&gt;
* '''w3af''' - http://w3af.org&lt;br /&gt;
** w3af is a Web Application Attack and Audit Framework. The project’s goal is finding and exploiting web application vulnerabilities.&lt;br /&gt;
* '''skipfish''' - http://code.google.com/p/skipfish/&lt;br /&gt;
** Skipfish is an active web application security reconnaissance tool.&lt;br /&gt;
* '''Web Developer toolbar''' - https://chrome.google.com/webstore/detail/bfbameneiokkgbdmiekhjnmfkcnldhhm&lt;br /&gt;
** The Web Developer extension adds a toolbar button to the browser with various web developer tools. This is the official port of the Web Developer extension for Firefox.&lt;br /&gt;
* '''HTTP Request Maker''' - https://chrome.google.com/webstore/detail/kajfghlhfkcocafkcjlajldicbikpgnp?hl=en-US&lt;br /&gt;
** Request Maker is a tool for penetration testing. With it you can easily capture requests made by web pages, tamper with the URL, headers and POST data and, of course, make new requests&lt;br /&gt;
* '''Cookie Editor''' - https://chrome.google.com/webstore/detail/fngmhnnpilhplaeedifhccceomclgfbg?hl=en-US&lt;br /&gt;
** Edit This Cookie is a cookie manager. You can add, delete, edit, search, protect and block cookies&lt;br /&gt;
* '''Cookie swap''' - https://chrome.google.com/webstore/detail/dffhipnliikkblkhpjapbecpmoilcama?hl=en-US&lt;br /&gt;
** Swap My Cookies is a session manager, it manages cookies, letting you login on any website with several different accounts. &lt;br /&gt;
* '''Firebug lite for Chrome&amp;quot;&amp;quot; -  https://chrome.google.com/webstore/detail/bmagokdooijbeehmkpknfglimnifench&lt;br /&gt;
**Firebug Lite is not a substitute for Firebug, or Chrome Developer Tools. It is a tool to be used in conjunction with these tools. Firebug Lite provides the rich visual representation we are used to see in Firebug when it comes to HTML elements, DOM elements, and Box Model shading. It provides also some cool features like inspecting HTML elements with your mouse, and live editing CSS properties&lt;br /&gt;
* '''Session Manager&amp;quot;&amp;quot; -  https://chrome.google.com/webstore/detail/bbcnbpafconjjigibnhbfmmgdbbkcjfi&lt;br /&gt;
**With Session Manager you can quickly save your current browser state and reload it whenever necessary. You can manage multiple sessions, rename or remove them from the session library. Each session remembers the state of the browser at its creation time, i.e the opened tabs and windows.&lt;br /&gt;
* '''Subgraph Vega''' - http://www.subgraph.com/products.html &lt;br /&gt;
**Vega is a free and open source scanner and testing platform to test the security of web applications. Vega can help you find and validate SQL Injection, Cross-Site Scripting (XSS), inadvertently disclosed sensitive information, and other vulnerabilities. It is written in Java, GUI based, and runs on Linux, OS X, and Windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Testing for specific vulnerabilities ===&lt;br /&gt;
&lt;br /&gt;
==== Testing for DOM XSS ====&lt;br /&gt;
* DOMinator Pro - https://dominator.mindedsecurity.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Testing AJAX ====&lt;br /&gt;
* '''[[:Category:OWASP Sprajax Project|OWASP Sprajax Project]]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Testing for SQL Injection ====&lt;br /&gt;
* '''[[:Category:OWASP_SQLiX_Project|OWASP SQLiX]]'''&lt;br /&gt;
* Sqlninja: a SQL Server Injection &amp;amp; Takeover Tool - http://sqlninja.sourceforge.net&lt;br /&gt;
* Bernardo Damele A. G.: sqlmap, automatic SQL injection tool - http://sqlmap.org/&lt;br /&gt;
* Absinthe 1.1 (formerly SQLSqueal) - http://sourceforge.net/projects/absinthe/&lt;br /&gt;
* SQLInjector - Uses inference techniques to extract data and determine the backend database server.  http://www.databasesecurity.com/sql-injector.htm&lt;br /&gt;
* Bsqlbf-v2: A perl script allows extraction of data from Blind SQL Injections - http://code.google.com/p/bsqlbf-v2/&lt;br /&gt;
* Pangolin: An automatic SQL injection penetration testing tool - http://www.darknet.org.uk/2009/05/pangolin-automatic-sql-injection-tool/&lt;br /&gt;
* Antonio Parata: Dump Files by sql inference on Mysql - SqlDumper - http://www.ruizata.com/&lt;br /&gt;
* Multiple DBMS Sql Injection tool - SQL Power Injector - http://www.sqlpowerinjector.com/&lt;br /&gt;
* MySql Blind Injection Bruteforcing, Reversing.org - sqlbftools - http://packetstormsecurity.org/files/43795/sqlbftools-1.2.tar.gz.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Testing Oracle ====&lt;br /&gt;
* TNS Listener tool (Perl) - http://www.jammed.com/%7Ejwa/hacks/security/tnscmd/tnscmd-doc.html&lt;br /&gt;
* Toad for Oracle - http://www.quest.com/toad &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Testing SSL ====&lt;br /&gt;
* Foundstone SSL Digger - http://www.mcafee.com/us/downloads/free-tools/ssldigger.aspx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Testing for Brute Force Password ====&lt;br /&gt;
* THC Hydra - http://www.thc.org/thc-hydra/&lt;br /&gt;
* John the Ripper - http://www.openwall.com/john/&lt;br /&gt;
* Brutus - http://www.hoobie.net/brutus/ &lt;br /&gt;
* Medusa - http://www.foofus.net/~jmk/medusa/medusa.html&lt;br /&gt;
* Ncat - http://nmap.org/ncat/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Testing Buffer Overflow ====&lt;br /&gt;
*  OllyDbg - http://www.ollydbg.de&lt;br /&gt;
** &amp;quot;A windows based debugger used for analyzing buffer overflow vulnerabilities&amp;quot;&lt;br /&gt;
* Spike - http://www.immunitysec.com/downloads/SPIKE2.9.tgz&lt;br /&gt;
** A fuzzer framework that can be used to explore vulnerabilities and perform length testing&lt;br /&gt;
* Brute Force Binary Tester (BFB) - http://bfbtester.sourceforge.net&lt;br /&gt;
** A proactive binary checker&lt;br /&gt;
* Metasploit - http://www.metasploit.com/&lt;br /&gt;
** A rapid exploit development and Testing frame work&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Fuzzer  ====&lt;br /&gt;
* '''[[:Category:OWASP_WSFuzzer_Project|OWASP WSFuzzer]]'''&lt;br /&gt;
* Wfuzz - http://www.darknet.org.uk/2007/07/wfuzz-a-tool-for-bruteforcingfuzzing-web-applications/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Googling ====&lt;br /&gt;
* Bishop Fox's Google Hacking Diggity Project - http://www.bishopfox.com/resources/tools/google-hacking-diggity/&lt;br /&gt;
* Foundstone Sitedigger (Google cached fault-finding) - http://www.mcafee.com/us/downloads/free-tools/sitedigger.aspx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Commercial Black Box Testing tools==&lt;br /&gt;
* NGS Typhon III - http://www.nccgroup.com/en/our-services/security-testing-audit-compliance/information-security-software/ngs-typhon-iii/&lt;br /&gt;
* NGSSQuirreL - http://www.nccgroup.com/en/our-services/security-testing-audit-compliance/information-security-software/ngs-squirrel-vulnerability-scanners/&lt;br /&gt;
* IBM AppScan - http://www-01.ibm.com/software/awdtools/appscan/&lt;br /&gt;
* Trustwave App Scanner (Formerly Cenzic Hailstorm) - https://www.trustwave.com/Products/Application-Security/App-Scanner-Family/App-Scanner-Enterprise/ &lt;br /&gt;
* Burp Intruder - http://www.portswigger.net/burp/intruder.html&lt;br /&gt;
* Acunetix Web Vulnerability Scanner - http://www.acunetix.com&lt;br /&gt;
* Sleuth - http://www.sandsprite.com&lt;br /&gt;
* NT Objectives NTOSpider - http://www.ntobjectives.com/products/ntospider.php&lt;br /&gt;
* MaxPatrol Security Scanner - http://www.maxpatrol.com&lt;br /&gt;
* Ecyware GreenBlue Inspector - http://www.ecyware.com&lt;br /&gt;
* Parasoft SOAtest (more QA-type tool)- http://www.parasoft.com/jsp/products/soatest.jsp?itemId=101&lt;br /&gt;
* MatriXay - http://www.dbappsecurity.com/webscan.html&lt;br /&gt;
* N-Stalker Web Application Security Scanner - http://www.nstalker.com&lt;br /&gt;
* HP WebInspect - http://www.hpenterprisesecurity.com/products/hp-fortify-software-security-center/hp-webinspect&lt;br /&gt;
* SoapUI (Web Service security testing) - http://www.soapui.org/Security/getting-started.html&lt;br /&gt;
* Netsparker - http://www.mavitunasecurity.com/netsparker/&lt;br /&gt;
* SAINT - http://www.saintcorporation.com/&lt;br /&gt;
* QualysGuard WAS - http://www.qualys.com/enterprises/qualysguard/web-application-scanning/&lt;br /&gt;
* IndusGuard Web - https://www.indusface.com/index.php/products/indusguard-web&lt;br /&gt;
* Retina Web - http://www.eeye.com/Products/Retina/Web-Security-Scanner.aspx&lt;br /&gt;
&lt;br /&gt;
==Source Code Analyzers==&lt;br /&gt;
&lt;br /&gt;
===Open Source / Freeware===&lt;br /&gt;
* [[:Category:OWASP_Orizon_Project|Owasp Orizon]]&lt;br /&gt;
* '''[[:Category:OWASP_LAPSE_Project|OWASP LAPSE]]''' &lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
* [[OWASP WAP-Web Application Protection]]&lt;br /&gt;
* Google CodeSearchDiggity - http://www.bishopfox.com/resources/tools/google-hacking-diggity/attack-tools/&lt;br /&gt;
* PMD - http://pmd.sourceforge.net/&lt;br /&gt;
* FlawFinder - http://www.dwheeler.com/flawfinder&lt;br /&gt;
* Microsoft’s [[FxCop]]&lt;br /&gt;
* Splint - http://splint.org&lt;br /&gt;
* Boon - http://www.cs.berkeley.edu/~daw/boon&lt;br /&gt;
* FindBugs - http://findbugs.sourceforge.net&lt;br /&gt;
* Find Security Bugs - http://h3xstream.github.io/find-sec-bugs/&lt;br /&gt;
* Oedipus - http://www.darknet.org.uk/2006/06/oedipus-open-source-web-application-security-analysis/&lt;br /&gt;
* W3af - http://w3af.sourceforge.net/&lt;br /&gt;
* phpcs-security-audit - https://github.com/Pheromone/phpcs-security-audit&lt;br /&gt;
&lt;br /&gt;
===Commercial ===&lt;br /&gt;
&lt;br /&gt;
* Armorize CodeSecure - http://www.armorize.com/index.php?link_id=codesecure&lt;br /&gt;
* Parasoft C/C++ test - http://www.parasoft.com/jsp/products/cpptest.jsp/index.htm&lt;br /&gt;
* Checkmarx CxSuite  - http://www.checkmarx.com&lt;br /&gt;
* HP Fortify - http://www.hpenterprisesecurity.com/products/hp-fortify-software-security-center/hp-fortify-static-code-analyzer&lt;br /&gt;
* GrammaTech - http://www.grammatech.com&lt;br /&gt;
* ITS4 - http://seclab.cs.ucdavis.edu/projects/testing/tools/its4.html&lt;br /&gt;
* Appscan - http://www-01.ibm.com/software/rational/products/appscan/source/&lt;br /&gt;
* ParaSoft - http://www.parasoft.com&lt;br /&gt;
* Virtual Forge CodeProfiler for ABAP - http://www.virtualforge.de&lt;br /&gt;
* Veracode - http://www.veracode.com&lt;br /&gt;
* Armorize CodeSecure - http://www.armorize.com/codesecure/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Acceptance Testing Tools==&lt;br /&gt;
Acceptance testing tools are used to validate the functionality of web applications.  Some follow a scripted approach and typically make use of a Unit Testing framework to construct test suites and test cases.  Most, if not all, can be adapted to perform security specific tests in addition to functional tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Open Source Tools===&lt;br /&gt;
&lt;br /&gt;
* WATIR - http://wtr.rubyforge.org&lt;br /&gt;
** A Ruby based web testing framework that provides an interface into Internet Explorer.&lt;br /&gt;
** Windows only.&lt;br /&gt;
* HtmlUnit - http://htmlunit.sourceforge.net &lt;br /&gt;
** A Java and JUnit based framework that uses the Apache HttpClient as the transport.&lt;br /&gt;
** Very robust and configurable and is used as the engine for a number of other testing tools.&lt;br /&gt;
* jWebUnit - http://jwebunit.sourceforge.net&lt;br /&gt;
** A Java based meta-framework that uses htmlunit or selenium as the testing engine.&lt;br /&gt;
* Canoo Webtest - http://webtest.canoo.com&lt;br /&gt;
** An XML based testing tool that provides a facade on top of htmlunit.&lt;br /&gt;
** No coding is necessary as the tests are completely specified in XML.&lt;br /&gt;
** There is the option of scripting some elements in Groovy if XML does not suffice.&lt;br /&gt;
** Very actively maintained.&lt;br /&gt;
* HttpUnit - http://httpunit.sourceforge.net&lt;br /&gt;
** One of the first web testing frameworks, suffers from using the native JDK provided HTTP transport, which can be a bit limiting for security testing.&lt;br /&gt;
* Watij - http://watij.com&lt;br /&gt;
** A Java implementation of WATIR.&lt;br /&gt;
** Windows only because it uses IE for its tests (Mozilla integration is in the works).&lt;br /&gt;
* Solex - http://solex.sourceforge.net&lt;br /&gt;
** An Eclipse plugin that provides a graphical tool to record HTTP sessions and make assertions based on the results.&lt;br /&gt;
* Selenium - http://seleniumhq.org/&lt;br /&gt;
** JavaScript based testing framework, cross-platform and provides a GUI for creating tests.&lt;br /&gt;
** Mature and popular tool, but the use of JavaScript could hamper certain security tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
===Runtime Analysis===&lt;br /&gt;
&lt;br /&gt;
* Rational PurifyPlus - http://www-01.ibm.com/software/awdtools/purify/&lt;br /&gt;
* Seeker by Quotium - http://www.quotium.com/prod/security.php&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Binary Analysis===&lt;br /&gt;
&lt;br /&gt;
* BugScam IDC Package - http://sourceforge.net/projects/bugscam&lt;br /&gt;
* Veracode - http://www.veracode.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Requirements Management===&lt;br /&gt;
&lt;br /&gt;
* Rational Requisite Pro - http://www-306.ibm.com/software/awdtools/reqpro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Site Mirroring===&lt;br /&gt;
* wget - http://www.gnu.org/software/wget, http://www.interlog.com/~tcharron/wgetwin.html&lt;br /&gt;
* curl - http://curl.haxx.se &lt;br /&gt;
* Sam Spade - http://www.samspade.org&lt;br /&gt;
* Xenu's Link Sleuth - http://home.snafu.de/tilman/xenulink.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:SAMM-CR-2]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=206589</id>
		<title>Static Code Analysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=206589"/>
				<updated>2016-01-16T18:31:32Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* OWASP Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Every '''[[Control]]''' should follow this template.&lt;br /&gt;
&lt;br /&gt;
{{Template:Control}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Static Code Analysis (also known as Source Code Analysis) is usually performed as part of a Code Review (also known as white-box testing) and is carried out at the Implementation phase of a Security Development Lifecycle (SDL). Static Code Analysis commonly refers to the running of Static Code Analysis tools that attempt to highlight possible vulnerabilities within 'static' (non-running) source code by using techniques such as Taint Analysis and Data Flow Analysis.&lt;br /&gt;
&lt;br /&gt;
Ideally, such tools would automatically find security flaws with a high degree of confidence that what is found is indeed a flaw. However, this is beyond the state of the art for many types of application security flaws. Thus, such tools frequently serve as aids for an analyst to help them zero in on security relevant portions of code so they can find flaws more efficiently, rather than a tool that simply finds flaws automatically.&lt;br /&gt;
&lt;br /&gt;
Some tools are starting to move into the Integrated Development Environment (IDE). For the types of problems that can be detected during the software development phase itself, this is a powerful phase within the development lifecycle to employ such tools, as it provides immediate feedback to the developer on issues they might be introducing into the code during code development itself. This immediate feedback is very useful as compared to finding vulnerabilities much later in the development cycle.&lt;br /&gt;
&lt;br /&gt;
The UK Defense Standard 00-55 requires that Static Code Analysis be used on all 'safety related software in defense equipment'. [0]&lt;br /&gt;
&lt;br /&gt;
==Techniques==&lt;br /&gt;
There are various techniques to analyze static source code for potential vulnerabilities that maybe combined into one solution. These techniques are often derived from compiler technologies.&lt;br /&gt;
&lt;br /&gt;
===Data Flow Analysis===&lt;br /&gt;
Data flow analysis is used to collect run-time (dynamic) information about data in software while it is in a static state (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
There are three common terms used in data flow analysis, basic block (the code), Control Flow Analysis (the flow of data) and Control Flow Path (the path the data takes):&lt;br /&gt;
&lt;br /&gt;
Basic block: A sequence of consecutive instructions where control enters at the beginning of a block, control leaves at the end of a block and the block cannot halt or branch out except at its end (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example PHP basic block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. $a = 0;&lt;br /&gt;
2. $b = 1;&lt;br /&gt;
3. &lt;br /&gt;
4. if ($a == $b) &lt;br /&gt;
5. { # start of block&lt;br /&gt;
6.   echo “a and b are the same”;&lt;br /&gt;
7. } # end of block &lt;br /&gt;
8. else &lt;br /&gt;
9. { # start of block &lt;br /&gt;
10. echo “a and b are different”;&lt;br /&gt;
11.} # end of block&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Control Flow Graph (CFG) ===&lt;br /&gt;
An abstract graph representation of software by use of nodes that represent basic blocks. A node in a graph represents a block; directed edges are used to represent jumps (paths) from one block to another. If a node only has an exit edge, this is known as an ‘entry’ block, if a node only has a entry edge, this is know as an ‘exit’ block (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example Control Flow Graph; ‘node 1’ represents the entry block and ‘node 6’ represents the exit block.&lt;br /&gt;
&lt;br /&gt;
￼[[File:Control_flow_graph.png|400x200px]]&lt;br /&gt;
&lt;br /&gt;
===Taint Analysis===&lt;br /&gt;
Taint Analysis attempts to identify variables that have been 'tainted' with user controllable input and traces them to possible vulnerable functions also known as a 'sink'. If the tainted variable gets passed to a sink without first being sanitized it is flagged as a vulnerability.&lt;br /&gt;
&lt;br /&gt;
Some programming languages such as Perl and Ruby have Taint Checking built into them and enabled in certain situations such as accepting data via CGI.&lt;br /&gt;
&lt;br /&gt;
===Lexical Analysis===&lt;br /&gt;
Lexical Analysis converts source code syntax into ‘tokens’ of information in an attempt to abstract the source code and make it easier to manipulate (Sotirov, 2005).&lt;br /&gt;
&lt;br /&gt;
Pre tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;?php $name = &amp;quot;Ryan&amp;quot;; ?&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Post tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
T_OPEN_TAG&lt;br /&gt;
T_VARIABLE&lt;br /&gt;
=&lt;br /&gt;
T_CONSTANT_ENCAPSED_STRING&lt;br /&gt;
;&lt;br /&gt;
T_CLOSE_TAG&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Strengths and Weaknesses==&lt;br /&gt;
&lt;br /&gt;
=== Strengths ===&lt;br /&gt;
* Scales Well (Can be run on lots of software, and can be repeatedly (like in nightly builds))&lt;br /&gt;
* For things that such tools can automatically find with high confidence, such as buffer overflows, SQL Injection Flaws, etc. they are great.&lt;br /&gt;
&lt;br /&gt;
=== Weaknesses ===&lt;br /&gt;
* Many types of security vulnerabilities are very difficult to find automatically, such as authentication problems, access control issues, insecure use of cryptography, etc. The current state of the art only allows such tools to automatically find a relatively small percentage of application security flaws. Tools of this type are getting better, however.&lt;br /&gt;
* High numbers of false positives.&lt;br /&gt;
* Frequently can't find configuration issues, since they are not represented in the code.&lt;br /&gt;
* Difficult to 'prove' that an identified security issue is an actual vulnerability.&lt;br /&gt;
* Many of these tools have difficulty analyzing code that can't be compiled. Analysts frequently can't compile code because they don't have the right libraries, all the compilation instructions, all the code, etc.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
===False Positives===&lt;br /&gt;
A static code analysis tool will often produce false positive results where the tool reports a possible vulnerability that in fact is not. This often occurs because the tool cannot be sure of the integrity and security of data as it flows through the application from input to output.&lt;br /&gt;
&lt;br /&gt;
False positive results might be reported when analysing an application that interacts with closed source components or external systems because without the source code it is impossible to trace the flow of data in the external system and hence ensure the integrity and security of the data.&lt;br /&gt;
&lt;br /&gt;
===False Negatives===&lt;br /&gt;
The use of static code analysis tools can also result in false negative results where vulnerabilities result but the tool does not report them. This might occur if a new vulnerability is discovered in an external component or if the analysis tool has no knowledge of the runtime environment and whether it is configured securely.&lt;br /&gt;
&lt;br /&gt;
==Important Selection Criteria==&lt;br /&gt;
&lt;br /&gt;
* Requirement: Must support your language, but not usually a key factor once it does.&lt;br /&gt;
* Types of Vulnerabilities it can detect (The OWASP Top Ten?) (more?)&lt;br /&gt;
* Does it require a fully buildable set of source?&lt;br /&gt;
* Can it run against binaries instead of source?&lt;br /&gt;
* Can it be integrated into the developer's IDE?&lt;br /&gt;
* License cost for the tool. (Some are sold per user, per org, per app, per line of code analyzed. Consulting licenses are frequently different than end user licenses.)&lt;br /&gt;
* Does it support Object-oriented programming (OOP)?&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===RIPS PHP Static Code Analysis Tool===&lt;br /&gt;
[[File:Rips.jpg|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
===OWASP LAPSE+ Static Code Analysis Tool===&lt;br /&gt;
[[File:LapsePlusScreenshot.png|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
===OWASP Tools===&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_Code_Crawler OWASP Code Crawler] (.NET &amp;amp; Java)&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_Orizon_Project OWASP Orizon Project] (Java,PHP,C &amp;amp; JSP)&lt;br /&gt;
* [[OWASP_LAPSE_Project | OWASP LAPSE Project]] (Java)&lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
* [[OWASP WAP-Web Application Protection]] (PHP)&lt;br /&gt;
&lt;br /&gt;
=== Open Source/Free ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.stachliu.com/resources/tools/google-hacking-diggity-project/attack-tools/ Google CodeSearchDiggity] (Multiple)&lt;br /&gt;
* [http://pmd.sourceforge.net/ PMD] (Java)&lt;br /&gt;
* [http://www.dwheeler.com/flawfinder/ FlawFinder] (C/C++)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/bb429476(v=vs.80).aspx Microsoft FxCop] (.NET)&lt;br /&gt;
* [http://www.splint.org Splint] (C)&lt;br /&gt;
* [http://findbugs.sourceforge.net/ FindBugs] (Java)&lt;br /&gt;
* [http://sourceforge.net/projects/rips-scanner/ RIPS] (PHP)&lt;br /&gt;
* [http://sourceforge.net/projects/agnitiotool/ Agnitio] (Objective-C, C#, Java &amp;amp; Android)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/ms933794.aspx Microsoft PreFast] (C/C++)&lt;br /&gt;
* [https://www.fortify.com/ssa-elements/threat-intelligence/rats.html Fortify RATS] (C, C++, Perl, PHP &amp;amp; Python)&lt;br /&gt;
* [http://www.devbug.co.uk DevBug] (PHP)&lt;br /&gt;
* [http://brakemanscanner.org/ Brakeman] (Rails)&lt;br /&gt;
* [http://sourceforge.net/projects/visualcodegrepp/ VisualCodeGrepper] (C/C++, C#, VB, PHP, Java &amp;amp; PL/SQL)&lt;br /&gt;
&lt;br /&gt;
=== Commercial ===&lt;br /&gt;
&lt;br /&gt;
* [https://www.fortify.com/ Fortify] (OWASP Member)&lt;br /&gt;
* [https://www.veracode.com/ Veracode] (OWASP Member)&lt;br /&gt;
* [http://www.grammatech.com/ GrammaTech]&lt;br /&gt;
* [http://www.parasoft.com/jsp/home.jsp ParaSoft]&lt;br /&gt;
* [http://www.armorize.com/codesecure/ Armorize CodeSecure] (OWASP Member)&lt;br /&gt;
* [http://www.checkmarx.com/ Checkmarx Static Code Analysis] (OWASP Member)&lt;br /&gt;
* [http://www-01.ibm.com/software/rational/products/appscan/source/ Rational AppScan Source Edition]&lt;br /&gt;
* [http://www.coverity.com/products/static-analysis.html Coverity]&lt;br /&gt;
* [http://www.viva64.com/en/ PVS-Studio]&lt;br /&gt;
* [http://www.klocwork.com/products/insight.asp Insight]&lt;br /&gt;
* [http://www.mathworks.com/products/polyspace/ Polyspace Static Analysis]&lt;br /&gt;
&lt;br /&gt;
===Other Tool Lists===&lt;br /&gt;
&lt;br /&gt;
* [http://samate.nist.gov/index.php/Source_Code_Security_Analyzers.html NIST - Source Code Security Analyzers]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis Wikipedia - List of tools for static code analysis]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[0] Ministry of Defence (MoD). (1997) ''SAFETY RELATED SOFTWARE IN DEFENSE EQUIPMENT'' [Online]. Available at: http://www.software-supportability.org/Docs/00-55_Part_2.pdf (Accessed: 5 January 2012).&lt;br /&gt;
&lt;br /&gt;
[1] Northumbria University. (2012) ''Implementing Basic Static Code Analysis into Integrated Development Environments (IDEs) to Reduce Software Vulnerabilities'' [Online]. Available at: http://www.ethicalhack3r.co.uk/wp-content/uploads/2012/09/Implementing-Basic-Static-Code-Analysis-into-Integrated-Development-Environments-IDEs-to-Reduce-Software-Vulnerabilities.pdf (Accessed: 19 March 2013)&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/2/2e/OWASP_Code_Review_Guide-V1_1.pdf OWASP Code Review Guide v1.1]&lt;br /&gt;
* http://www.crosstalkonline.org/storage/issue-archives/2003/200311/200311-German.pdf&lt;br /&gt;
* http://www.ida.liu.se/~TDDC90/papers/industrial95.pdf&lt;br /&gt;
* http://www.php-security.org/downloads/rips.pdf&lt;br /&gt;
* http://www.seclab.tuwien.ac.at/papers/pixy.pdf&lt;br /&gt;
&lt;br /&gt;
[[Category:FIXME|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition, one should classify control based on the following subcategories: Ex:&amp;lt;nowiki&amp;gt;[[Category:Error Handling Control]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Availability Control&lt;br /&gt;
&lt;br /&gt;
Authorization Control&lt;br /&gt;
&lt;br /&gt;
Authentication Control&lt;br /&gt;
&lt;br /&gt;
Concurrency Control&lt;br /&gt;
&lt;br /&gt;
Configuration Control&lt;br /&gt;
&lt;br /&gt;
Cryptographic Control&lt;br /&gt;
&lt;br /&gt;
Encoding Control&lt;br /&gt;
&lt;br /&gt;
Error Handling Control&lt;br /&gt;
&lt;br /&gt;
Input Validation Control&lt;br /&gt;
&lt;br /&gt;
Logging and Auditing Control&lt;br /&gt;
&lt;br /&gt;
Session Management Control&lt;br /&gt;
]]&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:Control]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Source_Code_Analysis_Tools&amp;diff=206588</id>
		<title>Source Code Analysis Tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Source_Code_Analysis_Tools&amp;diff=206588"/>
				<updated>2016-01-16T18:30:51Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* OWASP Tools Of This Type */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{taggedDocument&lt;br /&gt;
| type=partialOld&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Source code analysis tools are designed to analyze source code and/or compiled version of code in order to help find security flaws. Ideally, such tools would automatically find security flaws with such a high degree of confidence that what's found is indeed a flaw. However, this is beyond the state of the art for many types of application security flaws. Thus, such tools frequently serve as aids for an analyst to help them zero in on security relevant portions of code so they can find flaws more efficiently, rather than a tool that just automatically finds flaws.&lt;br /&gt;
&lt;br /&gt;
Some tools are starting to move into the IDE. For the types of problems that can be detected during the software development phase itself, this is a powerful phase within the development life cycle to employ such tools, as it provides immediate feedback to the developer on issues they might be introducing into the code during code development itself. This immediate feedback is very useful, especially when compared to finding vulnerabilities much later in the development cycle.&lt;br /&gt;
&lt;br /&gt;
== Strengths and weaknesses ==&lt;br /&gt;
&lt;br /&gt;
=== Strengths ===&lt;br /&gt;
&lt;br /&gt;
* Scales well -- can be run on lots of software, and can be repeatedly (as with nightly builds)&lt;br /&gt;
* Useful for things that such tools can automatically find with high confidence, such as buffer overflows, SQL Injection Flaws, and so forth&lt;br /&gt;
* Output is good for developers -- highlights the precise source files and line numbers that are affected&lt;br /&gt;
&lt;br /&gt;
=== Weaknesses ===&lt;br /&gt;
&lt;br /&gt;
* Many types of security vulnerabilities are very difficult to find automatically, such as authentication problems, access control issues, insecure use of cryptography, etc. The current state of the art only allows such tools to automatically find a relatively small percentage of application security flaws. Tools of this type are getting better, however.&lt;br /&gt;
* High numbers of false positives.&lt;br /&gt;
* Frequently can't find configuration issues, since they are not represented in the code.&lt;br /&gt;
* Difficult to 'prove' that an identified security issue is an actual vulnerability.&lt;br /&gt;
* Many of these tools have difficulty analyzing code that can't be compiled. Analysts frequently can't compile code because they don't have the right libraries, all the compilation instructions, all the code, etc.&lt;br /&gt;
&lt;br /&gt;
==Important selection criteria==&lt;br /&gt;
&lt;br /&gt;
* Requirement: Must support your language, but not usually a key factor once it does.&lt;br /&gt;
* Types of vulnerabilities it can detect (out of the [[OWASP Top Ten]]?) (plus more?)&lt;br /&gt;
* Does it require a fully buildable set of source?&lt;br /&gt;
* Can it run against binaries instead of source?&lt;br /&gt;
* Can it be integrated into the developer's IDE?&lt;br /&gt;
* License cost for the tool. (Some are sold per user, per org, per app, per line of code analyzed. Consulting licenses are frequently different than end user licenses.)&lt;br /&gt;
&lt;br /&gt;
==OWASP Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/index.php/Category:OWASP_Orizon_Project OWASP Orizon Project]&lt;br /&gt;
* [[OWASP_LAPSE_Project | OWASP LAPSE Project]]&lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
* [[OWASP WAP-Web Application Protection]]&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
&lt;br /&gt;
Disclaimer: The tools listed in the tables below are presented in alphabetical order. OWASP does not endorse any of the vendors or tools by listing them in the table below. We have made every effort to provide this information as accurately as possible. If you are the vendor of a tool below and think that this information is incomplete or incorrect, please send an e-mail to our mailing list and we will make every effort to correct this information.&lt;br /&gt;
&lt;br /&gt;
==Open Source or Free Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [http://www.stachliu.com/resources/tools/google-hacking-diggity-project/attack-tools/ Google CodeSearchDiggity] - Utilizes Google Code Search to identifies vulnerabilities in open source code projects hosted by Google Code, MS CodePlex, SourceForge, Github, and more. The tool comes with over 130 default searches that identify SQL injection, cross-site scripting (XSS), insecure remote and local file includes, hard-coded passwords, and much more.  ''Essentially, Google CodeSearchDiggity provides a source code security analysis of nearly every single open source code project in existence – simultaneously.'' &lt;br /&gt;
* [http://findbugs.sourceforge.net/ FindBugs] - Find Bugs (including some security flaws) in Java Programs&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/bb429476(VS.80).aspx FxCop] (Microsoft) - FxCop is an application that analyzes managed code assemblies (code that targets the .NET Framework common language runtime) and reports information about the assemblies, such as possible design, localization, performance, and security improvements.&lt;br /&gt;
* [http://pmd.sourceforge.net/ PMD] - PMD scans Java source code and looks for potential code problems (this is a code quality tool that does not focus on security issues)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/ms933794.aspx PreFast] (Microsoft) - PREfast is a static analysis tool that identifies defects in C/C++ programs&lt;br /&gt;
* [https://www.fortify.com/ssa-elements/threat-intelligence/rats.html RATS] (Fortify) - Scans C, C++, Perl, PHP and Python source code for security problems like buffer overflows and TOCTOU (Time Of Check, Time Of Use) race conditions&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_SWAAT_Project OWASP SWAAT Project] - Simplistic Beta Tool - Languages: Java, JSP, ASP .Net, and PHP&lt;br /&gt;
* [http://www.dwheeler.com/flawfinder/ Flawfinder] Flawfinder - Scans C and C++&lt;br /&gt;
* [http://sourceforge.net/projects/rips-scanner/ RIPS] - RIPS is a static source code analyzer for vulnerabilities in PHP web applications&lt;br /&gt;
* [http://brakemanscanner.org/ Brakeman] - Brakeman is an open source vulnerability scanner specifically designed for Ruby on Rails applications&lt;br /&gt;
* [http://rubygems.org/gems/codesake-dawn Codesake Dawn] - Codesake Dawn is an open source security source code analyzer designed for Sinatra, Padrino and Ruby on Rails applications. It can work also for non web application wrote in Ruby programming language &lt;br /&gt;
* [http://sourceforge.net/projects/visualcodegrepp/ VCG] - Scans C/C++, Java, C# and PL/SQL for security issues and for comments which may indicate defective code. The config files can be used to carry out additional checks for banned functions or functions which commonly cause security issues.&lt;br /&gt;
&lt;br /&gt;
==Commercial Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [http://www.buguroo.com/ BugScout] (Buguroo Offensive Security)&lt;br /&gt;
** Latest generation source code analysis tool bugScout detects source code vulnerabilities and makes possible an accurate management of the life cycles due to its easy use.&lt;br /&gt;
* [http://www.contrastsecurity.com/ Contrast from Contrast Security]&lt;br /&gt;
** Contrast is not a static analysis tool like these others. It instruments the running application and provides code level results, but doesn't actually perform static analysis. It monitors the code that is actually running.&lt;br /&gt;
* [http://www-01.ibm.com/software/rational/products/appscan/source/ IBM Security AppScan Source Edition] (formerly Ounce)&lt;br /&gt;
* [http://www.klocwork.com/products/insight.asp Insight] (KlocWork)&lt;br /&gt;
* [http://www.parasoft.com/jsp/capabilities/static_analysis.jsp?itemId=547 Parasoft Test] (Parasoft)&lt;br /&gt;
* [http://www.pitbullsoftware.net/pitbull-scc-en/ Pitbull Source Code Control] (Pitbull SCC)&lt;br /&gt;
**Software application designed to solve efficiently application source code control with the appropriate compiled files to ensure integrity prior to placing it into production. Providing added value,allows the analysis of source code to identify if it has a malware that affects the normal functioning of the application.&lt;br /&gt;
* [http://www.quotium.com/prod/security.php Seeker] ([http://www.quotium.com/ Quotium])&lt;br /&gt;
** Seeker performs code security without actually doing static analysis. Seeker does Interactive Application Security Testing (IAST), correlating runtime code &amp;amp; data analysis with simulated attacks. It provides code level results without actually relying on static analysis.&lt;br /&gt;
* [http://www.sourcepatrol.co.uk/ Source Patrol] (Pentest)&lt;br /&gt;
* [http://www.armorize.com/codesecure/ Static Source Code Analysis with CodeSecure™] (Armorize Technologies)&lt;br /&gt;
* [http://www.kiuwan.com  Kiuwan - SaaS Software Quality &amp;amp; Security Analysis] ([http://www.optimyth.com Optimyth])&lt;br /&gt;
* [http://www.checkmarx.com/technology/static-code-analysis-sca/ Static Code Analysis] (Checkmarx)&lt;br /&gt;
* [http://www.coverity.com/products/security-advisor.html Security Advisor] (Coverity)&lt;br /&gt;
* [http://www.viva64.com/en/ PVS-Studio] (PVS-Studio)&lt;br /&gt;
* [https://www.fortify.com/products/hpfssc/source-code-analyzer.html Source Code Analysis] (HP/Fortify)&lt;br /&gt;
* [http://www.veracode.com/ Veracode] (Veracode)&lt;br /&gt;
* [https://www.whitehatsec.com/offerings.html  Sentinel Source solution] (Whitehat)&lt;br /&gt;
&lt;br /&gt;
==More info==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- * TODO: add comments from: http://lists.owasp.org/pipermail/owasp-dotnet/2006-August/000002.html --&amp;gt;&lt;br /&gt;
* [[Appendix_A:_Testing_Tools | Appendix A: Testing Tools]]&lt;br /&gt;
* [http://samate.nist.gov/index.php/Source_Code_Security_Analyzers.html NIST's list of Source Code Security Analysis Tools]&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP .NET Project]]&lt;br /&gt;
[[Category:SAMM-CR-2]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Source_Code_Analysis_Tools&amp;diff=206587</id>
		<title>Source Code Analysis Tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Source_Code_Analysis_Tools&amp;diff=206587"/>
				<updated>2016-01-16T18:29:37Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* OWASP Tools Of This Type */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{taggedDocument&lt;br /&gt;
| type=partialOld&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Source code analysis tools are designed to analyze source code and/or compiled version of code in order to help find security flaws. Ideally, such tools would automatically find security flaws with such a high degree of confidence that what's found is indeed a flaw. However, this is beyond the state of the art for many types of application security flaws. Thus, such tools frequently serve as aids for an analyst to help them zero in on security relevant portions of code so they can find flaws more efficiently, rather than a tool that just automatically finds flaws.&lt;br /&gt;
&lt;br /&gt;
Some tools are starting to move into the IDE. For the types of problems that can be detected during the software development phase itself, this is a powerful phase within the development life cycle to employ such tools, as it provides immediate feedback to the developer on issues they might be introducing into the code during code development itself. This immediate feedback is very useful, especially when compared to finding vulnerabilities much later in the development cycle.&lt;br /&gt;
&lt;br /&gt;
== Strengths and weaknesses ==&lt;br /&gt;
&lt;br /&gt;
=== Strengths ===&lt;br /&gt;
&lt;br /&gt;
* Scales well -- can be run on lots of software, and can be repeatedly (as with nightly builds)&lt;br /&gt;
* Useful for things that such tools can automatically find with high confidence, such as buffer overflows, SQL Injection Flaws, and so forth&lt;br /&gt;
* Output is good for developers -- highlights the precise source files and line numbers that are affected&lt;br /&gt;
&lt;br /&gt;
=== Weaknesses ===&lt;br /&gt;
&lt;br /&gt;
* Many types of security vulnerabilities are very difficult to find automatically, such as authentication problems, access control issues, insecure use of cryptography, etc. The current state of the art only allows such tools to automatically find a relatively small percentage of application security flaws. Tools of this type are getting better, however.&lt;br /&gt;
* High numbers of false positives.&lt;br /&gt;
* Frequently can't find configuration issues, since they are not represented in the code.&lt;br /&gt;
* Difficult to 'prove' that an identified security issue is an actual vulnerability.&lt;br /&gt;
* Many of these tools have difficulty analyzing code that can't be compiled. Analysts frequently can't compile code because they don't have the right libraries, all the compilation instructions, all the code, etc.&lt;br /&gt;
&lt;br /&gt;
==Important selection criteria==&lt;br /&gt;
&lt;br /&gt;
* Requirement: Must support your language, but not usually a key factor once it does.&lt;br /&gt;
* Types of vulnerabilities it can detect (out of the [[OWASP Top Ten]]?) (plus more?)&lt;br /&gt;
* Does it require a fully buildable set of source?&lt;br /&gt;
* Can it run against binaries instead of source?&lt;br /&gt;
* Can it be integrated into the developer's IDE?&lt;br /&gt;
* License cost for the tool. (Some are sold per user, per org, per app, per line of code analyzed. Consulting licenses are frequently different than end user licenses.)&lt;br /&gt;
&lt;br /&gt;
==OWASP Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/index.php/Category:OWASP_Orizon_Project OWASP Orizon Project]&lt;br /&gt;
* [[OWASP_LAPSE_Project | OWASP LAPSE Project]]&lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
* [https://www.owasp.org/index.php/OWASP_WAP-Web_Application_Protection/ OWASP WAP-Web Application Protection]&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
&lt;br /&gt;
Disclaimer: The tools listed in the tables below are presented in alphabetical order. OWASP does not endorse any of the vendors or tools by listing them in the table below. We have made every effort to provide this information as accurately as possible. If you are the vendor of a tool below and think that this information is incomplete or incorrect, please send an e-mail to our mailing list and we will make every effort to correct this information.&lt;br /&gt;
&lt;br /&gt;
==Open Source or Free Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [http://www.stachliu.com/resources/tools/google-hacking-diggity-project/attack-tools/ Google CodeSearchDiggity] - Utilizes Google Code Search to identifies vulnerabilities in open source code projects hosted by Google Code, MS CodePlex, SourceForge, Github, and more. The tool comes with over 130 default searches that identify SQL injection, cross-site scripting (XSS), insecure remote and local file includes, hard-coded passwords, and much more.  ''Essentially, Google CodeSearchDiggity provides a source code security analysis of nearly every single open source code project in existence – simultaneously.'' &lt;br /&gt;
* [http://findbugs.sourceforge.net/ FindBugs] - Find Bugs (including some security flaws) in Java Programs&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/bb429476(VS.80).aspx FxCop] (Microsoft) - FxCop is an application that analyzes managed code assemblies (code that targets the .NET Framework common language runtime) and reports information about the assemblies, such as possible design, localization, performance, and security improvements.&lt;br /&gt;
* [http://pmd.sourceforge.net/ PMD] - PMD scans Java source code and looks for potential code problems (this is a code quality tool that does not focus on security issues)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/ms933794.aspx PreFast] (Microsoft) - PREfast is a static analysis tool that identifies defects in C/C++ programs&lt;br /&gt;
* [https://www.fortify.com/ssa-elements/threat-intelligence/rats.html RATS] (Fortify) - Scans C, C++, Perl, PHP and Python source code for security problems like buffer overflows and TOCTOU (Time Of Check, Time Of Use) race conditions&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_SWAAT_Project OWASP SWAAT Project] - Simplistic Beta Tool - Languages: Java, JSP, ASP .Net, and PHP&lt;br /&gt;
* [http://www.dwheeler.com/flawfinder/ Flawfinder] Flawfinder - Scans C and C++&lt;br /&gt;
* [http://sourceforge.net/projects/rips-scanner/ RIPS] - RIPS is a static source code analyzer for vulnerabilities in PHP web applications&lt;br /&gt;
* [http://brakemanscanner.org/ Brakeman] - Brakeman is an open source vulnerability scanner specifically designed for Ruby on Rails applications&lt;br /&gt;
* [http://rubygems.org/gems/codesake-dawn Codesake Dawn] - Codesake Dawn is an open source security source code analyzer designed for Sinatra, Padrino and Ruby on Rails applications. It can work also for non web application wrote in Ruby programming language &lt;br /&gt;
* [http://sourceforge.net/projects/visualcodegrepp/ VCG] - Scans C/C++, Java, C# and PL/SQL for security issues and for comments which may indicate defective code. The config files can be used to carry out additional checks for banned functions or functions which commonly cause security issues.&lt;br /&gt;
&lt;br /&gt;
==Commercial Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [http://www.buguroo.com/ BugScout] (Buguroo Offensive Security)&lt;br /&gt;
** Latest generation source code analysis tool bugScout detects source code vulnerabilities and makes possible an accurate management of the life cycles due to its easy use.&lt;br /&gt;
* [http://www.contrastsecurity.com/ Contrast from Contrast Security]&lt;br /&gt;
** Contrast is not a static analysis tool like these others. It instruments the running application and provides code level results, but doesn't actually perform static analysis. It monitors the code that is actually running.&lt;br /&gt;
* [http://www-01.ibm.com/software/rational/products/appscan/source/ IBM Security AppScan Source Edition] (formerly Ounce)&lt;br /&gt;
* [http://www.klocwork.com/products/insight.asp Insight] (KlocWork)&lt;br /&gt;
* [http://www.parasoft.com/jsp/capabilities/static_analysis.jsp?itemId=547 Parasoft Test] (Parasoft)&lt;br /&gt;
* [http://www.pitbullsoftware.net/pitbull-scc-en/ Pitbull Source Code Control] (Pitbull SCC)&lt;br /&gt;
**Software application designed to solve efficiently application source code control with the appropriate compiled files to ensure integrity prior to placing it into production. Providing added value,allows the analysis of source code to identify if it has a malware that affects the normal functioning of the application.&lt;br /&gt;
* [http://www.quotium.com/prod/security.php Seeker] ([http://www.quotium.com/ Quotium])&lt;br /&gt;
** Seeker performs code security without actually doing static analysis. Seeker does Interactive Application Security Testing (IAST), correlating runtime code &amp;amp; data analysis with simulated attacks. It provides code level results without actually relying on static analysis.&lt;br /&gt;
* [http://www.sourcepatrol.co.uk/ Source Patrol] (Pentest)&lt;br /&gt;
* [http://www.armorize.com/codesecure/ Static Source Code Analysis with CodeSecure™] (Armorize Technologies)&lt;br /&gt;
* [http://www.kiuwan.com  Kiuwan - SaaS Software Quality &amp;amp; Security Analysis] ([http://www.optimyth.com Optimyth])&lt;br /&gt;
* [http://www.checkmarx.com/technology/static-code-analysis-sca/ Static Code Analysis] (Checkmarx)&lt;br /&gt;
* [http://www.coverity.com/products/security-advisor.html Security Advisor] (Coverity)&lt;br /&gt;
* [http://www.viva64.com/en/ PVS-Studio] (PVS-Studio)&lt;br /&gt;
* [https://www.fortify.com/products/hpfssc/source-code-analyzer.html Source Code Analysis] (HP/Fortify)&lt;br /&gt;
* [http://www.veracode.com/ Veracode] (Veracode)&lt;br /&gt;
* [https://www.whitehatsec.com/offerings.html  Sentinel Source solution] (Whitehat)&lt;br /&gt;
&lt;br /&gt;
==More info==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- * TODO: add comments from: http://lists.owasp.org/pipermail/owasp-dotnet/2006-August/000002.html --&amp;gt;&lt;br /&gt;
* [[Appendix_A:_Testing_Tools | Appendix A: Testing Tools]]&lt;br /&gt;
* [http://samate.nist.gov/index.php/Source_Code_Security_Analyzers.html NIST's list of Source Code Security Analysis Tools]&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP .NET Project]]&lt;br /&gt;
[[Category:SAMM-CR-2]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=206586</id>
		<title>Static Code Analysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=206586"/>
				<updated>2016-01-16T18:27:28Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* OWASP Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Every '''[[Control]]''' should follow this template.&lt;br /&gt;
&lt;br /&gt;
{{Template:Control}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Static Code Analysis (also known as Source Code Analysis) is usually performed as part of a Code Review (also known as white-box testing) and is carried out at the Implementation phase of a Security Development Lifecycle (SDL). Static Code Analysis commonly refers to the running of Static Code Analysis tools that attempt to highlight possible vulnerabilities within 'static' (non-running) source code by using techniques such as Taint Analysis and Data Flow Analysis.&lt;br /&gt;
&lt;br /&gt;
Ideally, such tools would automatically find security flaws with a high degree of confidence that what is found is indeed a flaw. However, this is beyond the state of the art for many types of application security flaws. Thus, such tools frequently serve as aids for an analyst to help them zero in on security relevant portions of code so they can find flaws more efficiently, rather than a tool that simply finds flaws automatically.&lt;br /&gt;
&lt;br /&gt;
Some tools are starting to move into the Integrated Development Environment (IDE). For the types of problems that can be detected during the software development phase itself, this is a powerful phase within the development lifecycle to employ such tools, as it provides immediate feedback to the developer on issues they might be introducing into the code during code development itself. This immediate feedback is very useful as compared to finding vulnerabilities much later in the development cycle.&lt;br /&gt;
&lt;br /&gt;
The UK Defense Standard 00-55 requires that Static Code Analysis be used on all 'safety related software in defense equipment'. [0]&lt;br /&gt;
&lt;br /&gt;
==Techniques==&lt;br /&gt;
There are various techniques to analyze static source code for potential vulnerabilities that maybe combined into one solution. These techniques are often derived from compiler technologies.&lt;br /&gt;
&lt;br /&gt;
===Data Flow Analysis===&lt;br /&gt;
Data flow analysis is used to collect run-time (dynamic) information about data in software while it is in a static state (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
There are three common terms used in data flow analysis, basic block (the code), Control Flow Analysis (the flow of data) and Control Flow Path (the path the data takes):&lt;br /&gt;
&lt;br /&gt;
Basic block: A sequence of consecutive instructions where control enters at the beginning of a block, control leaves at the end of a block and the block cannot halt or branch out except at its end (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example PHP basic block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. $a = 0;&lt;br /&gt;
2. $b = 1;&lt;br /&gt;
3. &lt;br /&gt;
4. if ($a == $b) &lt;br /&gt;
5. { # start of block&lt;br /&gt;
6.   echo “a and b are the same”;&lt;br /&gt;
7. } # end of block &lt;br /&gt;
8. else &lt;br /&gt;
9. { # start of block &lt;br /&gt;
10. echo “a and b are different”;&lt;br /&gt;
11.} # end of block&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Control Flow Graph (CFG) ===&lt;br /&gt;
An abstract graph representation of software by use of nodes that represent basic blocks. A node in a graph represents a block; directed edges are used to represent jumps (paths) from one block to another. If a node only has an exit edge, this is known as an ‘entry’ block, if a node only has a entry edge, this is know as an ‘exit’ block (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example Control Flow Graph; ‘node 1’ represents the entry block and ‘node 6’ represents the exit block.&lt;br /&gt;
&lt;br /&gt;
￼[[File:Control_flow_graph.png|400x200px]]&lt;br /&gt;
&lt;br /&gt;
===Taint Analysis===&lt;br /&gt;
Taint Analysis attempts to identify variables that have been 'tainted' with user controllable input and traces them to possible vulnerable functions also known as a 'sink'. If the tainted variable gets passed to a sink without first being sanitized it is flagged as a vulnerability.&lt;br /&gt;
&lt;br /&gt;
Some programming languages such as Perl and Ruby have Taint Checking built into them and enabled in certain situations such as accepting data via CGI.&lt;br /&gt;
&lt;br /&gt;
===Lexical Analysis===&lt;br /&gt;
Lexical Analysis converts source code syntax into ‘tokens’ of information in an attempt to abstract the source code and make it easier to manipulate (Sotirov, 2005).&lt;br /&gt;
&lt;br /&gt;
Pre tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;?php $name = &amp;quot;Ryan&amp;quot;; ?&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Post tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
T_OPEN_TAG&lt;br /&gt;
T_VARIABLE&lt;br /&gt;
=&lt;br /&gt;
T_CONSTANT_ENCAPSED_STRING&lt;br /&gt;
;&lt;br /&gt;
T_CLOSE_TAG&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Strengths and Weaknesses==&lt;br /&gt;
&lt;br /&gt;
=== Strengths ===&lt;br /&gt;
* Scales Well (Can be run on lots of software, and can be repeatedly (like in nightly builds))&lt;br /&gt;
* For things that such tools can automatically find with high confidence, such as buffer overflows, SQL Injection Flaws, etc. they are great.&lt;br /&gt;
&lt;br /&gt;
=== Weaknesses ===&lt;br /&gt;
* Many types of security vulnerabilities are very difficult to find automatically, such as authentication problems, access control issues, insecure use of cryptography, etc. The current state of the art only allows such tools to automatically find a relatively small percentage of application security flaws. Tools of this type are getting better, however.&lt;br /&gt;
* High numbers of false positives.&lt;br /&gt;
* Frequently can't find configuration issues, since they are not represented in the code.&lt;br /&gt;
* Difficult to 'prove' that an identified security issue is an actual vulnerability.&lt;br /&gt;
* Many of these tools have difficulty analyzing code that can't be compiled. Analysts frequently can't compile code because they don't have the right libraries, all the compilation instructions, all the code, etc.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
===False Positives===&lt;br /&gt;
A static code analysis tool will often produce false positive results where the tool reports a possible vulnerability that in fact is not. This often occurs because the tool cannot be sure of the integrity and security of data as it flows through the application from input to output.&lt;br /&gt;
&lt;br /&gt;
False positive results might be reported when analysing an application that interacts with closed source components or external systems because without the source code it is impossible to trace the flow of data in the external system and hence ensure the integrity and security of the data.&lt;br /&gt;
&lt;br /&gt;
===False Negatives===&lt;br /&gt;
The use of static code analysis tools can also result in false negative results where vulnerabilities result but the tool does not report them. This might occur if a new vulnerability is discovered in an external component or if the analysis tool has no knowledge of the runtime environment and whether it is configured securely.&lt;br /&gt;
&lt;br /&gt;
==Important Selection Criteria==&lt;br /&gt;
&lt;br /&gt;
* Requirement: Must support your language, but not usually a key factor once it does.&lt;br /&gt;
* Types of Vulnerabilities it can detect (The OWASP Top Ten?) (more?)&lt;br /&gt;
* Does it require a fully buildable set of source?&lt;br /&gt;
* Can it run against binaries instead of source?&lt;br /&gt;
* Can it be integrated into the developer's IDE?&lt;br /&gt;
* License cost for the tool. (Some are sold per user, per org, per app, per line of code analyzed. Consulting licenses are frequently different than end user licenses.)&lt;br /&gt;
* Does it support Object-oriented programming (OOP)?&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===RIPS PHP Static Code Analysis Tool===&lt;br /&gt;
[[File:Rips.jpg|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
===OWASP LAPSE+ Static Code Analysis Tool===&lt;br /&gt;
[[File:LapsePlusScreenshot.png|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
===OWASP Tools===&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_Code_Crawler OWASP Code Crawler] (.NET &amp;amp; Java)&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_Orizon_Project OWASP Orizon Project] (Java,PHP,C &amp;amp; JSP)&lt;br /&gt;
* [[OWASP_LAPSE_Project | OWASP LAPSE Project]] (Java)&lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
* [https://www.owasp.org/index.php/OWASP_WAP-Web_Application_Protection/ OWASP WAP-Web Application Protection] (PHP)&lt;br /&gt;
&lt;br /&gt;
=== Open Source/Free ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.stachliu.com/resources/tools/google-hacking-diggity-project/attack-tools/ Google CodeSearchDiggity] (Multiple)&lt;br /&gt;
* [http://pmd.sourceforge.net/ PMD] (Java)&lt;br /&gt;
* [http://www.dwheeler.com/flawfinder/ FlawFinder] (C/C++)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/bb429476(v=vs.80).aspx Microsoft FxCop] (.NET)&lt;br /&gt;
* [http://www.splint.org Splint] (C)&lt;br /&gt;
* [http://findbugs.sourceforge.net/ FindBugs] (Java)&lt;br /&gt;
* [http://sourceforge.net/projects/rips-scanner/ RIPS] (PHP)&lt;br /&gt;
* [http://sourceforge.net/projects/agnitiotool/ Agnitio] (Objective-C, C#, Java &amp;amp; Android)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/ms933794.aspx Microsoft PreFast] (C/C++)&lt;br /&gt;
* [https://www.fortify.com/ssa-elements/threat-intelligence/rats.html Fortify RATS] (C, C++, Perl, PHP &amp;amp; Python)&lt;br /&gt;
* [http://www.devbug.co.uk DevBug] (PHP)&lt;br /&gt;
* [http://brakemanscanner.org/ Brakeman] (Rails)&lt;br /&gt;
* [http://sourceforge.net/projects/visualcodegrepp/ VisualCodeGrepper] (C/C++, C#, VB, PHP, Java &amp;amp; PL/SQL)&lt;br /&gt;
&lt;br /&gt;
=== Commercial ===&lt;br /&gt;
&lt;br /&gt;
* [https://www.fortify.com/ Fortify] (OWASP Member)&lt;br /&gt;
* [https://www.veracode.com/ Veracode] (OWASP Member)&lt;br /&gt;
* [http://www.grammatech.com/ GrammaTech]&lt;br /&gt;
* [http://www.parasoft.com/jsp/home.jsp ParaSoft]&lt;br /&gt;
* [http://www.armorize.com/codesecure/ Armorize CodeSecure] (OWASP Member)&lt;br /&gt;
* [http://www.checkmarx.com/ Checkmarx Static Code Analysis] (OWASP Member)&lt;br /&gt;
* [http://www-01.ibm.com/software/rational/products/appscan/source/ Rational AppScan Source Edition]&lt;br /&gt;
* [http://www.coverity.com/products/static-analysis.html Coverity]&lt;br /&gt;
* [http://www.viva64.com/en/ PVS-Studio]&lt;br /&gt;
* [http://www.klocwork.com/products/insight.asp Insight]&lt;br /&gt;
* [http://www.mathworks.com/products/polyspace/ Polyspace Static Analysis]&lt;br /&gt;
&lt;br /&gt;
===Other Tool Lists===&lt;br /&gt;
&lt;br /&gt;
* [http://samate.nist.gov/index.php/Source_Code_Security_Analyzers.html NIST - Source Code Security Analyzers]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis Wikipedia - List of tools for static code analysis]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[0] Ministry of Defence (MoD). (1997) ''SAFETY RELATED SOFTWARE IN DEFENSE EQUIPMENT'' [Online]. Available at: http://www.software-supportability.org/Docs/00-55_Part_2.pdf (Accessed: 5 January 2012).&lt;br /&gt;
&lt;br /&gt;
[1] Northumbria University. (2012) ''Implementing Basic Static Code Analysis into Integrated Development Environments (IDEs) to Reduce Software Vulnerabilities'' [Online]. Available at: http://www.ethicalhack3r.co.uk/wp-content/uploads/2012/09/Implementing-Basic-Static-Code-Analysis-into-Integrated-Development-Environments-IDEs-to-Reduce-Software-Vulnerabilities.pdf (Accessed: 19 March 2013)&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/2/2e/OWASP_Code_Review_Guide-V1_1.pdf OWASP Code Review Guide v1.1]&lt;br /&gt;
* http://www.crosstalkonline.org/storage/issue-archives/2003/200311/200311-German.pdf&lt;br /&gt;
* http://www.ida.liu.se/~TDDC90/papers/industrial95.pdf&lt;br /&gt;
* http://www.php-security.org/downloads/rips.pdf&lt;br /&gt;
* http://www.seclab.tuwien.ac.at/papers/pixy.pdf&lt;br /&gt;
&lt;br /&gt;
[[Category:FIXME|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition, one should classify control based on the following subcategories: Ex:&amp;lt;nowiki&amp;gt;[[Category:Error Handling Control]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Availability Control&lt;br /&gt;
&lt;br /&gt;
Authorization Control&lt;br /&gt;
&lt;br /&gt;
Authentication Control&lt;br /&gt;
&lt;br /&gt;
Concurrency Control&lt;br /&gt;
&lt;br /&gt;
Configuration Control&lt;br /&gt;
&lt;br /&gt;
Cryptographic Control&lt;br /&gt;
&lt;br /&gt;
Encoding Control&lt;br /&gt;
&lt;br /&gt;
Error Handling Control&lt;br /&gt;
&lt;br /&gt;
Input Validation Control&lt;br /&gt;
&lt;br /&gt;
Logging and Auditing Control&lt;br /&gt;
&lt;br /&gt;
Session Management Control&lt;br /&gt;
]]&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:Control]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=206585</id>
		<title>Static Code Analysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=206585"/>
				<updated>2016-01-16T18:25:49Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Open Source/Free */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Every '''[[Control]]''' should follow this template.&lt;br /&gt;
&lt;br /&gt;
{{Template:Control}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Static Code Analysis (also known as Source Code Analysis) is usually performed as part of a Code Review (also known as white-box testing) and is carried out at the Implementation phase of a Security Development Lifecycle (SDL). Static Code Analysis commonly refers to the running of Static Code Analysis tools that attempt to highlight possible vulnerabilities within 'static' (non-running) source code by using techniques such as Taint Analysis and Data Flow Analysis.&lt;br /&gt;
&lt;br /&gt;
Ideally, such tools would automatically find security flaws with a high degree of confidence that what is found is indeed a flaw. However, this is beyond the state of the art for many types of application security flaws. Thus, such tools frequently serve as aids for an analyst to help them zero in on security relevant portions of code so they can find flaws more efficiently, rather than a tool that simply finds flaws automatically.&lt;br /&gt;
&lt;br /&gt;
Some tools are starting to move into the Integrated Development Environment (IDE). For the types of problems that can be detected during the software development phase itself, this is a powerful phase within the development lifecycle to employ such tools, as it provides immediate feedback to the developer on issues they might be introducing into the code during code development itself. This immediate feedback is very useful as compared to finding vulnerabilities much later in the development cycle.&lt;br /&gt;
&lt;br /&gt;
The UK Defense Standard 00-55 requires that Static Code Analysis be used on all 'safety related software in defense equipment'. [0]&lt;br /&gt;
&lt;br /&gt;
==Techniques==&lt;br /&gt;
There are various techniques to analyze static source code for potential vulnerabilities that maybe combined into one solution. These techniques are often derived from compiler technologies.&lt;br /&gt;
&lt;br /&gt;
===Data Flow Analysis===&lt;br /&gt;
Data flow analysis is used to collect run-time (dynamic) information about data in software while it is in a static state (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
There are three common terms used in data flow analysis, basic block (the code), Control Flow Analysis (the flow of data) and Control Flow Path (the path the data takes):&lt;br /&gt;
&lt;br /&gt;
Basic block: A sequence of consecutive instructions where control enters at the beginning of a block, control leaves at the end of a block and the block cannot halt or branch out except at its end (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example PHP basic block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. $a = 0;&lt;br /&gt;
2. $b = 1;&lt;br /&gt;
3. &lt;br /&gt;
4. if ($a == $b) &lt;br /&gt;
5. { # start of block&lt;br /&gt;
6.   echo “a and b are the same”;&lt;br /&gt;
7. } # end of block &lt;br /&gt;
8. else &lt;br /&gt;
9. { # start of block &lt;br /&gt;
10. echo “a and b are different”;&lt;br /&gt;
11.} # end of block&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Control Flow Graph (CFG) ===&lt;br /&gt;
An abstract graph representation of software by use of nodes that represent basic blocks. A node in a graph represents a block; directed edges are used to represent jumps (paths) from one block to another. If a node only has an exit edge, this is known as an ‘entry’ block, if a node only has a entry edge, this is know as an ‘exit’ block (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example Control Flow Graph; ‘node 1’ represents the entry block and ‘node 6’ represents the exit block.&lt;br /&gt;
&lt;br /&gt;
￼[[File:Control_flow_graph.png|400x200px]]&lt;br /&gt;
&lt;br /&gt;
===Taint Analysis===&lt;br /&gt;
Taint Analysis attempts to identify variables that have been 'tainted' with user controllable input and traces them to possible vulnerable functions also known as a 'sink'. If the tainted variable gets passed to a sink without first being sanitized it is flagged as a vulnerability.&lt;br /&gt;
&lt;br /&gt;
Some programming languages such as Perl and Ruby have Taint Checking built into them and enabled in certain situations such as accepting data via CGI.&lt;br /&gt;
&lt;br /&gt;
===Lexical Analysis===&lt;br /&gt;
Lexical Analysis converts source code syntax into ‘tokens’ of information in an attempt to abstract the source code and make it easier to manipulate (Sotirov, 2005).&lt;br /&gt;
&lt;br /&gt;
Pre tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;?php $name = &amp;quot;Ryan&amp;quot;; ?&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Post tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
T_OPEN_TAG&lt;br /&gt;
T_VARIABLE&lt;br /&gt;
=&lt;br /&gt;
T_CONSTANT_ENCAPSED_STRING&lt;br /&gt;
;&lt;br /&gt;
T_CLOSE_TAG&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Strengths and Weaknesses==&lt;br /&gt;
&lt;br /&gt;
=== Strengths ===&lt;br /&gt;
* Scales Well (Can be run on lots of software, and can be repeatedly (like in nightly builds))&lt;br /&gt;
* For things that such tools can automatically find with high confidence, such as buffer overflows, SQL Injection Flaws, etc. they are great.&lt;br /&gt;
&lt;br /&gt;
=== Weaknesses ===&lt;br /&gt;
* Many types of security vulnerabilities are very difficult to find automatically, such as authentication problems, access control issues, insecure use of cryptography, etc. The current state of the art only allows such tools to automatically find a relatively small percentage of application security flaws. Tools of this type are getting better, however.&lt;br /&gt;
* High numbers of false positives.&lt;br /&gt;
* Frequently can't find configuration issues, since they are not represented in the code.&lt;br /&gt;
* Difficult to 'prove' that an identified security issue is an actual vulnerability.&lt;br /&gt;
* Many of these tools have difficulty analyzing code that can't be compiled. Analysts frequently can't compile code because they don't have the right libraries, all the compilation instructions, all the code, etc.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
===False Positives===&lt;br /&gt;
A static code analysis tool will often produce false positive results where the tool reports a possible vulnerability that in fact is not. This often occurs because the tool cannot be sure of the integrity and security of data as it flows through the application from input to output.&lt;br /&gt;
&lt;br /&gt;
False positive results might be reported when analysing an application that interacts with closed source components or external systems because without the source code it is impossible to trace the flow of data in the external system and hence ensure the integrity and security of the data.&lt;br /&gt;
&lt;br /&gt;
===False Negatives===&lt;br /&gt;
The use of static code analysis tools can also result in false negative results where vulnerabilities result but the tool does not report them. This might occur if a new vulnerability is discovered in an external component or if the analysis tool has no knowledge of the runtime environment and whether it is configured securely.&lt;br /&gt;
&lt;br /&gt;
==Important Selection Criteria==&lt;br /&gt;
&lt;br /&gt;
* Requirement: Must support your language, but not usually a key factor once it does.&lt;br /&gt;
* Types of Vulnerabilities it can detect (The OWASP Top Ten?) (more?)&lt;br /&gt;
* Does it require a fully buildable set of source?&lt;br /&gt;
* Can it run against binaries instead of source?&lt;br /&gt;
* Can it be integrated into the developer's IDE?&lt;br /&gt;
* License cost for the tool. (Some are sold per user, per org, per app, per line of code analyzed. Consulting licenses are frequently different than end user licenses.)&lt;br /&gt;
* Does it support Object-oriented programming (OOP)?&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===RIPS PHP Static Code Analysis Tool===&lt;br /&gt;
[[File:Rips.jpg|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
===OWASP LAPSE+ Static Code Analysis Tool===&lt;br /&gt;
[[File:LapsePlusScreenshot.png|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
===OWASP Tools===&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_Code_Crawler OWASP Code Crawler] (.NET &amp;amp; Java)&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_Orizon_Project OWASP Orizon Project] (Java,PHP,C &amp;amp; JSP)&lt;br /&gt;
* [[OWASP_LAPSE_Project | OWASP LAPSE Project]] (Java)&lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
&lt;br /&gt;
=== Open Source/Free ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.stachliu.com/resources/tools/google-hacking-diggity-project/attack-tools/ Google CodeSearchDiggity] (Multiple)&lt;br /&gt;
* [http://pmd.sourceforge.net/ PMD] (Java)&lt;br /&gt;
* [http://www.dwheeler.com/flawfinder/ FlawFinder] (C/C++)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/bb429476(v=vs.80).aspx Microsoft FxCop] (.NET)&lt;br /&gt;
* [http://www.splint.org Splint] (C)&lt;br /&gt;
* [http://findbugs.sourceforge.net/ FindBugs] (Java)&lt;br /&gt;
* [http://sourceforge.net/projects/rips-scanner/ RIPS] (PHP)&lt;br /&gt;
* [http://sourceforge.net/projects/agnitiotool/ Agnitio] (Objective-C, C#, Java &amp;amp; Android)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/ms933794.aspx Microsoft PreFast] (C/C++)&lt;br /&gt;
* [https://www.fortify.com/ssa-elements/threat-intelligence/rats.html Fortify RATS] (C, C++, Perl, PHP &amp;amp; Python)&lt;br /&gt;
* [http://www.devbug.co.uk DevBug] (PHP)&lt;br /&gt;
* [http://brakemanscanner.org/ Brakeman] (Rails)&lt;br /&gt;
* [http://sourceforge.net/projects/visualcodegrepp/ VisualCodeGrepper] (C/C++, C#, VB, PHP, Java &amp;amp; PL/SQL)&lt;br /&gt;
&lt;br /&gt;
=== Commercial ===&lt;br /&gt;
&lt;br /&gt;
* [https://www.fortify.com/ Fortify] (OWASP Member)&lt;br /&gt;
* [https://www.veracode.com/ Veracode] (OWASP Member)&lt;br /&gt;
* [http://www.grammatech.com/ GrammaTech]&lt;br /&gt;
* [http://www.parasoft.com/jsp/home.jsp ParaSoft]&lt;br /&gt;
* [http://www.armorize.com/codesecure/ Armorize CodeSecure] (OWASP Member)&lt;br /&gt;
* [http://www.checkmarx.com/ Checkmarx Static Code Analysis] (OWASP Member)&lt;br /&gt;
* [http://www-01.ibm.com/software/rational/products/appscan/source/ Rational AppScan Source Edition]&lt;br /&gt;
* [http://www.coverity.com/products/static-analysis.html Coverity]&lt;br /&gt;
* [http://www.viva64.com/en/ PVS-Studio]&lt;br /&gt;
* [http://www.klocwork.com/products/insight.asp Insight]&lt;br /&gt;
* [http://www.mathworks.com/products/polyspace/ Polyspace Static Analysis]&lt;br /&gt;
&lt;br /&gt;
===Other Tool Lists===&lt;br /&gt;
&lt;br /&gt;
* [http://samate.nist.gov/index.php/Source_Code_Security_Analyzers.html NIST - Source Code Security Analyzers]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis Wikipedia - List of tools for static code analysis]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[0] Ministry of Defence (MoD). (1997) ''SAFETY RELATED SOFTWARE IN DEFENSE EQUIPMENT'' [Online]. Available at: http://www.software-supportability.org/Docs/00-55_Part_2.pdf (Accessed: 5 January 2012).&lt;br /&gt;
&lt;br /&gt;
[1] Northumbria University. (2012) ''Implementing Basic Static Code Analysis into Integrated Development Environments (IDEs) to Reduce Software Vulnerabilities'' [Online]. Available at: http://www.ethicalhack3r.co.uk/wp-content/uploads/2012/09/Implementing-Basic-Static-Code-Analysis-into-Integrated-Development-Environments-IDEs-to-Reduce-Software-Vulnerabilities.pdf (Accessed: 19 March 2013)&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/2/2e/OWASP_Code_Review_Guide-V1_1.pdf OWASP Code Review Guide v1.1]&lt;br /&gt;
* http://www.crosstalkonline.org/storage/issue-archives/2003/200311/200311-German.pdf&lt;br /&gt;
* http://www.ida.liu.se/~TDDC90/papers/industrial95.pdf&lt;br /&gt;
* http://www.php-security.org/downloads/rips.pdf&lt;br /&gt;
* http://www.seclab.tuwien.ac.at/papers/pixy.pdf&lt;br /&gt;
&lt;br /&gt;
[[Category:FIXME|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition, one should classify control based on the following subcategories: Ex:&amp;lt;nowiki&amp;gt;[[Category:Error Handling Control]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Availability Control&lt;br /&gt;
&lt;br /&gt;
Authorization Control&lt;br /&gt;
&lt;br /&gt;
Authentication Control&lt;br /&gt;
&lt;br /&gt;
Concurrency Control&lt;br /&gt;
&lt;br /&gt;
Configuration Control&lt;br /&gt;
&lt;br /&gt;
Cryptographic Control&lt;br /&gt;
&lt;br /&gt;
Encoding Control&lt;br /&gt;
&lt;br /&gt;
Error Handling Control&lt;br /&gt;
&lt;br /&gt;
Input Validation Control&lt;br /&gt;
&lt;br /&gt;
Logging and Auditing Control&lt;br /&gt;
&lt;br /&gt;
Session Management Control&lt;br /&gt;
]]&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:Control]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=206584</id>
		<title>Static Code Analysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=206584"/>
				<updated>2016-01-16T18:25:21Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Open Source/Free */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Every '''[[Control]]''' should follow this template.&lt;br /&gt;
&lt;br /&gt;
{{Template:Control}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Static Code Analysis (also known as Source Code Analysis) is usually performed as part of a Code Review (also known as white-box testing) and is carried out at the Implementation phase of a Security Development Lifecycle (SDL). Static Code Analysis commonly refers to the running of Static Code Analysis tools that attempt to highlight possible vulnerabilities within 'static' (non-running) source code by using techniques such as Taint Analysis and Data Flow Analysis.&lt;br /&gt;
&lt;br /&gt;
Ideally, such tools would automatically find security flaws with a high degree of confidence that what is found is indeed a flaw. However, this is beyond the state of the art for many types of application security flaws. Thus, such tools frequently serve as aids for an analyst to help them zero in on security relevant portions of code so they can find flaws more efficiently, rather than a tool that simply finds flaws automatically.&lt;br /&gt;
&lt;br /&gt;
Some tools are starting to move into the Integrated Development Environment (IDE). For the types of problems that can be detected during the software development phase itself, this is a powerful phase within the development lifecycle to employ such tools, as it provides immediate feedback to the developer on issues they might be introducing into the code during code development itself. This immediate feedback is very useful as compared to finding vulnerabilities much later in the development cycle.&lt;br /&gt;
&lt;br /&gt;
The UK Defense Standard 00-55 requires that Static Code Analysis be used on all 'safety related software in defense equipment'. [0]&lt;br /&gt;
&lt;br /&gt;
==Techniques==&lt;br /&gt;
There are various techniques to analyze static source code for potential vulnerabilities that maybe combined into one solution. These techniques are often derived from compiler technologies.&lt;br /&gt;
&lt;br /&gt;
===Data Flow Analysis===&lt;br /&gt;
Data flow analysis is used to collect run-time (dynamic) information about data in software while it is in a static state (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
There are three common terms used in data flow analysis, basic block (the code), Control Flow Analysis (the flow of data) and Control Flow Path (the path the data takes):&lt;br /&gt;
&lt;br /&gt;
Basic block: A sequence of consecutive instructions where control enters at the beginning of a block, control leaves at the end of a block and the block cannot halt or branch out except at its end (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example PHP basic block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. $a = 0;&lt;br /&gt;
2. $b = 1;&lt;br /&gt;
3. &lt;br /&gt;
4. if ($a == $b) &lt;br /&gt;
5. { # start of block&lt;br /&gt;
6.   echo “a and b are the same”;&lt;br /&gt;
7. } # end of block &lt;br /&gt;
8. else &lt;br /&gt;
9. { # start of block &lt;br /&gt;
10. echo “a and b are different”;&lt;br /&gt;
11.} # end of block&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Control Flow Graph (CFG) ===&lt;br /&gt;
An abstract graph representation of software by use of nodes that represent basic blocks. A node in a graph represents a block; directed edges are used to represent jumps (paths) from one block to another. If a node only has an exit edge, this is known as an ‘entry’ block, if a node only has a entry edge, this is know as an ‘exit’ block (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example Control Flow Graph; ‘node 1’ represents the entry block and ‘node 6’ represents the exit block.&lt;br /&gt;
&lt;br /&gt;
￼[[File:Control_flow_graph.png|400x200px]]&lt;br /&gt;
&lt;br /&gt;
===Taint Analysis===&lt;br /&gt;
Taint Analysis attempts to identify variables that have been 'tainted' with user controllable input and traces them to possible vulnerable functions also known as a 'sink'. If the tainted variable gets passed to a sink without first being sanitized it is flagged as a vulnerability.&lt;br /&gt;
&lt;br /&gt;
Some programming languages such as Perl and Ruby have Taint Checking built into them and enabled in certain situations such as accepting data via CGI.&lt;br /&gt;
&lt;br /&gt;
===Lexical Analysis===&lt;br /&gt;
Lexical Analysis converts source code syntax into ‘tokens’ of information in an attempt to abstract the source code and make it easier to manipulate (Sotirov, 2005).&lt;br /&gt;
&lt;br /&gt;
Pre tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;?php $name = &amp;quot;Ryan&amp;quot;; ?&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Post tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
T_OPEN_TAG&lt;br /&gt;
T_VARIABLE&lt;br /&gt;
=&lt;br /&gt;
T_CONSTANT_ENCAPSED_STRING&lt;br /&gt;
;&lt;br /&gt;
T_CLOSE_TAG&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Strengths and Weaknesses==&lt;br /&gt;
&lt;br /&gt;
=== Strengths ===&lt;br /&gt;
* Scales Well (Can be run on lots of software, and can be repeatedly (like in nightly builds))&lt;br /&gt;
* For things that such tools can automatically find with high confidence, such as buffer overflows, SQL Injection Flaws, etc. they are great.&lt;br /&gt;
&lt;br /&gt;
=== Weaknesses ===&lt;br /&gt;
* Many types of security vulnerabilities are very difficult to find automatically, such as authentication problems, access control issues, insecure use of cryptography, etc. The current state of the art only allows such tools to automatically find a relatively small percentage of application security flaws. Tools of this type are getting better, however.&lt;br /&gt;
* High numbers of false positives.&lt;br /&gt;
* Frequently can't find configuration issues, since they are not represented in the code.&lt;br /&gt;
* Difficult to 'prove' that an identified security issue is an actual vulnerability.&lt;br /&gt;
* Many of these tools have difficulty analyzing code that can't be compiled. Analysts frequently can't compile code because they don't have the right libraries, all the compilation instructions, all the code, etc.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
===False Positives===&lt;br /&gt;
A static code analysis tool will often produce false positive results where the tool reports a possible vulnerability that in fact is not. This often occurs because the tool cannot be sure of the integrity and security of data as it flows through the application from input to output.&lt;br /&gt;
&lt;br /&gt;
False positive results might be reported when analysing an application that interacts with closed source components or external systems because without the source code it is impossible to trace the flow of data in the external system and hence ensure the integrity and security of the data.&lt;br /&gt;
&lt;br /&gt;
===False Negatives===&lt;br /&gt;
The use of static code analysis tools can also result in false negative results where vulnerabilities result but the tool does not report them. This might occur if a new vulnerability is discovered in an external component or if the analysis tool has no knowledge of the runtime environment and whether it is configured securely.&lt;br /&gt;
&lt;br /&gt;
==Important Selection Criteria==&lt;br /&gt;
&lt;br /&gt;
* Requirement: Must support your language, but not usually a key factor once it does.&lt;br /&gt;
* Types of Vulnerabilities it can detect (The OWASP Top Ten?) (more?)&lt;br /&gt;
* Does it require a fully buildable set of source?&lt;br /&gt;
* Can it run against binaries instead of source?&lt;br /&gt;
* Can it be integrated into the developer's IDE?&lt;br /&gt;
* License cost for the tool. (Some are sold per user, per org, per app, per line of code analyzed. Consulting licenses are frequently different than end user licenses.)&lt;br /&gt;
* Does it support Object-oriented programming (OOP)?&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===RIPS PHP Static Code Analysis Tool===&lt;br /&gt;
[[File:Rips.jpg|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
===OWASP LAPSE+ Static Code Analysis Tool===&lt;br /&gt;
[[File:LapsePlusScreenshot.png|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
===OWASP Tools===&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_Code_Crawler OWASP Code Crawler] (.NET &amp;amp; Java)&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_Orizon_Project OWASP Orizon Project] (Java,PHP,C &amp;amp; JSP)&lt;br /&gt;
* [[OWASP_LAPSE_Project | OWASP LAPSE Project]] (Java)&lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
&lt;br /&gt;
=== Open Source/Free ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.stachliu.com/resources/tools/google-hacking-diggity-project/attack-tools/ Google CodeSearchDiggity] (Multiple)&lt;br /&gt;
* [http://pmd.sourceforge.net/ PMD] (Java)&lt;br /&gt;
* [http://www.dwheeler.com/flawfinder/ FlawFinder] (C/C++)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/bb429476(v=vs.80).aspx Microsoft FxCop] (.NET)&lt;br /&gt;
* [http://www.splint.org Splint] (C)&lt;br /&gt;
* [http://findbugs.sourceforge.net/ FindBugs] (Java)&lt;br /&gt;
* [http://sourceforge.net/projects/rips-scanner/ RIPS] (PHP)&lt;br /&gt;
* [https://www.owasp.org/index.php/OWASP_WAP-Web_Application_Protection/ OWASP WAP] (PHP)&lt;br /&gt;
* [http://sourceforge.net/projects/agnitiotool/ Agnitio] (Objective-C, C#, Java &amp;amp; Android)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/ms933794.aspx Microsoft PreFast] (C/C++)&lt;br /&gt;
* [https://www.fortify.com/ssa-elements/threat-intelligence/rats.html Fortify RATS] (C, C++, Perl, PHP &amp;amp; Python)&lt;br /&gt;
* [http://www.devbug.co.uk DevBug] (PHP)&lt;br /&gt;
* [http://brakemanscanner.org/ Brakeman] (Rails)&lt;br /&gt;
* [http://sourceforge.net/projects/visualcodegrepp/ VisualCodeGrepper] (C/C++, C#, VB, PHP, Java &amp;amp; PL/SQL)&lt;br /&gt;
&lt;br /&gt;
=== Commercial ===&lt;br /&gt;
&lt;br /&gt;
* [https://www.fortify.com/ Fortify] (OWASP Member)&lt;br /&gt;
* [https://www.veracode.com/ Veracode] (OWASP Member)&lt;br /&gt;
* [http://www.grammatech.com/ GrammaTech]&lt;br /&gt;
* [http://www.parasoft.com/jsp/home.jsp ParaSoft]&lt;br /&gt;
* [http://www.armorize.com/codesecure/ Armorize CodeSecure] (OWASP Member)&lt;br /&gt;
* [http://www.checkmarx.com/ Checkmarx Static Code Analysis] (OWASP Member)&lt;br /&gt;
* [http://www-01.ibm.com/software/rational/products/appscan/source/ Rational AppScan Source Edition]&lt;br /&gt;
* [http://www.coverity.com/products/static-analysis.html Coverity]&lt;br /&gt;
* [http://www.viva64.com/en/ PVS-Studio]&lt;br /&gt;
* [http://www.klocwork.com/products/insight.asp Insight]&lt;br /&gt;
* [http://www.mathworks.com/products/polyspace/ Polyspace Static Analysis]&lt;br /&gt;
&lt;br /&gt;
===Other Tool Lists===&lt;br /&gt;
&lt;br /&gt;
* [http://samate.nist.gov/index.php/Source_Code_Security_Analyzers.html NIST - Source Code Security Analyzers]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis Wikipedia - List of tools for static code analysis]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[0] Ministry of Defence (MoD). (1997) ''SAFETY RELATED SOFTWARE IN DEFENSE EQUIPMENT'' [Online]. Available at: http://www.software-supportability.org/Docs/00-55_Part_2.pdf (Accessed: 5 January 2012).&lt;br /&gt;
&lt;br /&gt;
[1] Northumbria University. (2012) ''Implementing Basic Static Code Analysis into Integrated Development Environments (IDEs) to Reduce Software Vulnerabilities'' [Online]. Available at: http://www.ethicalhack3r.co.uk/wp-content/uploads/2012/09/Implementing-Basic-Static-Code-Analysis-into-Integrated-Development-Environments-IDEs-to-Reduce-Software-Vulnerabilities.pdf (Accessed: 19 March 2013)&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/2/2e/OWASP_Code_Review_Guide-V1_1.pdf OWASP Code Review Guide v1.1]&lt;br /&gt;
* http://www.crosstalkonline.org/storage/issue-archives/2003/200311/200311-German.pdf&lt;br /&gt;
* http://www.ida.liu.se/~TDDC90/papers/industrial95.pdf&lt;br /&gt;
* http://www.php-security.org/downloads/rips.pdf&lt;br /&gt;
* http://www.seclab.tuwien.ac.at/papers/pixy.pdf&lt;br /&gt;
&lt;br /&gt;
[[Category:FIXME|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition, one should classify control based on the following subcategories: Ex:&amp;lt;nowiki&amp;gt;[[Category:Error Handling Control]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Availability Control&lt;br /&gt;
&lt;br /&gt;
Authorization Control&lt;br /&gt;
&lt;br /&gt;
Authentication Control&lt;br /&gt;
&lt;br /&gt;
Concurrency Control&lt;br /&gt;
&lt;br /&gt;
Configuration Control&lt;br /&gt;
&lt;br /&gt;
Cryptographic Control&lt;br /&gt;
&lt;br /&gt;
Encoding Control&lt;br /&gt;
&lt;br /&gt;
Error Handling Control&lt;br /&gt;
&lt;br /&gt;
Input Validation Control&lt;br /&gt;
&lt;br /&gt;
Logging and Auditing Control&lt;br /&gt;
&lt;br /&gt;
Session Management Control&lt;br /&gt;
]]&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:Control]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=201580</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=201580"/>
				<updated>2015-10-03T02:30:42Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
*02.Out.2015 - A new version of WAP is available - WAP v2.0.2&amp;lt;br/&amp;gt;&lt;br /&gt;
*WAP in Instituto Federal Catarinense, Blumenau, Brasil&amp;lt;br/&amp;gt;&lt;br /&gt;
*WAP in Universidade Federal do Amazonas, Manaus, Brasil&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
WAP in Instituto Federal Catarinense, Blumenau, Brasil&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Protection of Web Applications with the WAP Tool'''''. Aug 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WAP in Universidade Federal do Amazonas, Manaus, Brasil&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Protection of Web Applications with Data Mining to Detect False Positives'''''. Jul 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&lt;br /&gt;
* Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&lt;br /&gt;
* Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&lt;br /&gt;
* Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Detecting and Removing Web Application Vulnerabilities with Static Analysis and Data Mining'''''.  IEEE Transactions on Reliability, (accepted for publication)&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Web Application Protection with the WAP tool''''' (fast abstract). Proceedings of the 44th IEEE/IFIP International Conference on Dependable Systems and Networks (DSN'14), Atlanta, Georgia USA, June 2014. ([http://awap.sourceforge.net/papers/DSN14-fa.pdf paper])&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positives'''''. Proceedings of the 23rd International Conference on World Wide Web (WWW), Seoul, Korea, 11 pages, April 2014. ([http://awap.sourceforge.net/papers/WWW14.pdf paper]) &lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. Proceedings of the IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany, 6 pages, July 2013. ([http://awap.sourceforge.net/papers/INDIN13.pdf paper])&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=201579</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=201579"/>
				<updated>2015-10-03T02:28:50Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
*A new version of WAP is available - WAP v2.0.2&amp;lt;br/&amp;gt;&lt;br /&gt;
*WAP in Instituto Federal Catarinense, Blumenau, Brasil&amp;lt;br/&amp;gt;&lt;br /&gt;
*WAP in Universidade Federal do Amazonas, Manaus, Brasil&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
WAP in Instituto Federal Catarinense, Blumenau, Brasil&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Protection of Web Applications with the WAP Tool'''''. Aug 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WAP in Universidade Federal do Amazonas, Manaus, Brasil&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Protection of Web Applications with Data Mining to Detect False Positives'''''. Jul 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&lt;br /&gt;
* Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&lt;br /&gt;
* Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&lt;br /&gt;
* Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Detecting and Removing Web Application Vulnerabilities with Static Analysis and Data Mining'''''.  IEEE Transactions on Reliability, (accepted for publication)&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Web Application Protection with the WAP tool''''' (fast abstract). Proceedings of the 44th IEEE/IFIP International Conference on Dependable Systems and Networks (DSN'14), Atlanta, Georgia USA, June 2014. ([http://awap.sourceforge.net/papers/DSN14-fa.pdf paper])&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positives'''''. Proceedings of the 23rd International Conference on World Wide Web (WWW), Seoul, Korea, 11 pages, April 2014. ([http://awap.sourceforge.net/papers/WWW14.pdf paper]) &lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. Proceedings of the IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany, 6 pages, July 2013. ([http://awap.sourceforge.net/papers/INDIN13.pdf paper])&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=200588</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=200588"/>
				<updated>2015-09-15T00:12:56Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
*WAP in Instituto Federal Catarinense, Blumenau, Brasil&amp;lt;br/&amp;gt;&lt;br /&gt;
*WAP in Universidade Federal do Amazonas, Manaus, Brasil&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
WAP in Instituto Federal Catarinense, Blumenau, Brasil&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Protection of Web Applications with the WAP Tool'''''. Aug 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WAP in Universidade Federal do Amazonas, Manaus, Brasil&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Protection of Web Applications with Data Mining to Detect False Positives'''''. Jul 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&lt;br /&gt;
* Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&lt;br /&gt;
* Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&lt;br /&gt;
* Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Detecting and Removing Web Application Vulnerabilities with Static Analysis and Data Mining'''''.  IEEE Transactions on Reliability, (accepted for publication)&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Web Application Protection with the WAP tool''''' (fast abstract). Proceedings of the 44th IEEE/IFIP International Conference on Dependable Systems and Networks (DSN'14), Atlanta, Georgia USA, June 2014. ([http://awap.sourceforge.net/papers/DSN14-fa.pdf paper])&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positives'''''. Proceedings of the 23rd International Conference on World Wide Web (WWW), Seoul, Korea, 11 pages, April 2014. ([http://awap.sourceforge.net/papers/WWW14.pdf paper]) &lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. Proceedings of the IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany, 6 pages, July 2013. ([http://awap.sourceforge.net/papers/INDIN13.pdf paper])&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=200587</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=200587"/>
				<updated>2015-09-15T00:02:15Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
WAP in Instituto Federal Catarinense, Blumenau, Brasil&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Protection of Web Applications with the WAP Tool'''''. Aug 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WAP in Universidade Federal do Amazonas, Manaus, Brasil&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Protection of Web Applications with Data Mining to Detect False Positives'''''. Jul 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&lt;br /&gt;
* Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&lt;br /&gt;
* Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&lt;br /&gt;
* Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Detecting and Removing Web Application Vulnerabilities with Static Analysis and Data Mining'''''.  IEEE Transactions on Reliability, (accepted for publication)&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Web Application Protection with the WAP tool''''' (fast abstract). Proceedings of the 44th IEEE/IFIP International Conference on Dependable Systems and Networks (DSN'14), Atlanta, Georgia USA, June 2014. ([http://awap.sourceforge.net/papers/DSN14-fa.pdf paper])&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positives'''''. Proceedings of the 23rd International Conference on World Wide Web (WWW), Seoul, Korea, 11 pages, April 2014. ([http://awap.sourceforge.net/papers/WWW14.pdf paper]) &lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. Proceedings of the IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany, 6 pages, July 2013. ([http://awap.sourceforge.net/papers/INDIN13.pdf paper])&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=200586</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=200586"/>
				<updated>2015-09-14T23:48:54Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
WAP in Instituto Federal Catarinense, Blumenau, Brasil&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Protection of Web Applications with the WAP Tool'''''. Aug 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WAP in Universidade Federal do Amazonas, Manaus, Brasil&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Protection of Web Applications with Data Mining to Detect False Positives'''''. Jul 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&lt;br /&gt;
* Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&lt;br /&gt;
* Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&lt;br /&gt;
* Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Web Application Protection with the WAP tool''''' (fast abstract). Proceedings of the 44th IEEE/IFIP International Conference on Dependable Systems and Networks (DSN'14), Atlanta, Georgia USA, June 2014. ([http://awap.sourceforge.net/papers/DSN14-fa.pdf paper])&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positives'''''. Proceedings of the 23rd International Conference on World Wide Web (WWW), Seoul, Korea, 11 pages, April 2014. ([http://awap.sourceforge.net/papers/WWW14.pdf paper]) &lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. Proceedings of the IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany, 6 pages, July 2013. ([http://awap.sourceforge.net/papers/INDIN13.pdf paper])&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=200585</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=200585"/>
				<updated>2015-09-14T23:44:30Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
WAP in Instituto Federal Catarinense, Blumenau, Brasil&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Proteção de Aplicações Web com a Ferramenta WAP'''''. Aug 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&lt;br /&gt;
* Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&lt;br /&gt;
* Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&lt;br /&gt;
* Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Web Application Protection with the WAP tool''''' (fast abstract). Proceedings of the 44th IEEE/IFIP International Conference on Dependable Systems and Networks (DSN'14), Atlanta, Georgia USA, June 2014. ([http://awap.sourceforge.net/papers/DSN14-fa.pdf paper])&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positives'''''. Proceedings of the 23rd International Conference on World Wide Web (WWW), Seoul, Korea, 11 pages, April 2014. ([http://awap.sourceforge.net/papers/WWW14.pdf paper]) &lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. Proceedings of the IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany, 6 pages, July 2013. ([http://awap.sourceforge.net/papers/INDIN13.pdf paper])&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194208</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194208"/>
				<updated>2015-04-30T00:56:42Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&lt;br /&gt;
* Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&lt;br /&gt;
* Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&lt;br /&gt;
* Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&lt;br /&gt;
* Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&lt;br /&gt;
* Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Web Application Protection with the WAP tool''''' (fast abstract). Proceedings of the 44th IEEE/IFIP International Conference on Dependable Systems and Networks (DSN'14), Atlanta, Georgia USA, June 2014. ([http://awap.sourceforge.net/papers/DSN14-fa.pdf paper])&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positives'''''. Proceedings of the 23rd International Conference on World Wide Web (WWW), Seoul, Korea, 11 pages, April 2014. ([http://awap.sourceforge.net/papers/WWW14.pdf paper]) &lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. Proceedings of the IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany, 6 pages, July 2013. ([http://awap.sourceforge.net/papers/INDIN13.pdf paper])&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194207</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194207"/>
				<updated>2015-04-30T00:50:31Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
*[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://2014.dsn.org/ WAP in DSN Conference]. Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]. Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]. Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.indin2013.org/n/ WAP in INDIN Conference], Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Web Application Protection with the WAP tool''''' (fast abstract). Proceedings of the 44th IEEE/IFIP International Conference on Dependable Systems and Networks (DSN'14), Atlanta, Georgia USA, June 2014. ([http://awap.sourceforge.net/papers/DSN14-fa.pdf paper])&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positives'''''. Proceedings of the 23rd International Conference on World Wide Web (WWW), Seoul, Korea, 11 pages, April 2014. ([http://awap.sourceforge.net/papers/WWW14.pdf paper]) &lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. Proceedings of the IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany, 6 pages, July 2013. ([http://awap.sourceforge.net/papers/INDIN13.pdf paper])&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194049</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194049"/>
				<updated>2015-04-27T14:45:51Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events and Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://2014.dsn.org/ WAP in DSN Conference]. Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]. Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]. Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.indin2013.org/n/ WAP in INDIN Conference], Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Web Application Protection with the WAP tool''''' (fast abstract). Proceedings of the 44th IEEE/IFIP International Conference on Dependable Systems and Networks (DSN'14), Atlanta, Georgia USA, June 2014. ([http://awap.sourceforge.net/papers/DSN14-fa.pdf paper])&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positives'''''. Proceedings of the 23rd International Conference on World Wide Web (WWW), Seoul, Korea, 11 pages, April 2014. ([http://awap.sourceforge.net/papers/WWW14.pdf paper]) &lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. Proceedings of the IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany, 6 pages, July 2013. ([http://awap.sourceforge.net/papers/INDIN13.pdf paper])&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194016</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194016"/>
				<updated>2015-04-27T02:25:03Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events and Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. Narch 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://2014.dsn.org/ WAP in DSN Conference]. Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]. Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]. Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.indin2013.org/n/ WAP in INDIN Conference], Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Web Application Protection with the WAP tool''''' (fast abstract). Proceedings of the 44th IEEE/IFIP International Conference on Dependable Systems and Networks (DSN'14), Atlanta, Georgia USA, June 2014. ([http://awap.sourceforge.net/papers/DSN14-fa.pdf paper])&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positives'''''. Proceedings of the 23rd International Conference on World Wide Web (WWW), Seoul, Korea, 11 pages, April 2014. ([http://awap.sourceforge.net/papers/WWW14.pdf paper]) &lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. Proceedings of the IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany, 6 pages, July 2013. ([http://awap.sourceforge.net/papers/INDIN13.pdf paper])&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194015</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194015"/>
				<updated>2015-04-27T02:24:29Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events and Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. Narch 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://2014.dsn.org/ WAP in DSN Conference]. Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]. Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]. Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.indin2013.org/n/ WAP in INDIN Conference], Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. Web Application Protection with the WAP tool (fast abstract). Proceedings of the 44th IEEE/IFIP International Conference on Dependable Systems and Networks (DSN'14), Atlanta, Georgia USA, June 2014. ([http://awap.sourceforge.net/papers/DSN14-fa.pdf paper])&lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positives'''''. Proceedings of the 23rd International Conference on World Wide Web (WWW), Seoul, Korea, 11 pages, April 2014. ([http://awap.sourceforge.net/papers/WWW14.pdf paper]) &lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. Proceedings of the IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany, 6 pages, July 2013. ([http://awap.sourceforge.net/papers/INDIN13.pdf paper])&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194014</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194014"/>
				<updated>2015-04-27T02:22:27Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events and Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. Narch 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://2014.dsn.org/ WAP in DSN Conference]. Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]. Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]. Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.indin2013.org/n/ WAP in INDIN Conference], Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positives'''''. Proceedings of the 23rd International Conference on World Wide Web (WWW), Seoul, Korea, 11 pages, April 2014. ([http://awap.sourceforge.net/papers/WWW14.pdf paper]) &lt;br /&gt;
&lt;br /&gt;
* Ibéria Medeiros, Nuno Neves, Miguel Correia. '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. Proceedings of the IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany, 6 pages, July 2013. ([http://awap.sourceforge.net/papers/INDIN13.pdf paper])&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194013</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194013"/>
				<updated>2015-04-27T02:16:21Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events and Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. Narch 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://2014.dsn.org/ WAP in DSN Conference]. Miguel Correia presented the comunication: '''''Web Application Protection with the WAP tool'''''. June 2014. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]. Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]. Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.indin2013.org/n/ WAP in INDIN Conference], Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194012</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194012"/>
				<updated>2015-04-27T02:14:48Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://2014.dsn.org/ WAP in DSN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. Narch 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]. Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]. Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.indin2013.org/n/ WAP in INDIN Conference], Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194011</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194011"/>
				<updated>2015-04-27T02:10:03Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.indin2013.org/n/ WAP in INDIN Conference]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. Narch 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]. Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]. Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.indin2013.org/n/ WAP in INDIN Conference], Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194010</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194010"/>
				<updated>2015-04-27T02:09:13Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events and Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. Narch 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]. Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]. Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.indin2013.org/n/ WAP in INDIN Conference], Ibéria Medeiros presented the comunication: '''''Securing Energy Metering Software with Automatic Source Code Correction'''''. July 2013.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194009</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194009"/>
				<updated>2015-04-27T01:59:46Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. Narch 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]. Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]. Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194008</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194008"/>
				<updated>2015-04-27T01:59:19Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events and Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. Narch 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]. Ibéria Medeiros presented a seminar: '''''Hybrid Methods to Detect and Correct Web Application Vulnerabilities Automatically'''''. May 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www2014.kr/ WAP in WWW Conference, in the research track Security 1]. Ibéria Medeiros presented the comunication: '''''Automatic Detection and Correction of Web Application Vulnerabilities using Data Mining to Predict False Positive'''''s. April 2014.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194007</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194007"/>
				<updated>2015-04-27T01:48:38Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://mocho.di.fc.ul.pt/mod/resource/view.php?id=13019 Seminar about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. Narch 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194006</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194006"/>
				<updated>2015-04-27T01:40:43Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net/news.html Many articles are talking about WAP]&amp;lt;br/&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. Narch 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194005</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194005"/>
				<updated>2015-04-27T01:37:41Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]&amp;lt;br/&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. Narch 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194004</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194004"/>
				<updated>2015-04-27T01:37:34Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events and Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora by Miguel Correia]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg, by Ibéria Medeiros]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://iscte.acm.org/event/web-application-protection/ WAP in ACM Student Chapter at ISCTE-IUL]. Ibéria Medeiros presented the WAP tool in the ACM Student Chapter. Narch 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194003</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194003"/>
				<updated>2015-04-27T01:30:27Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Volunteers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora by Miguel Correia]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg, by Ibéria Medeiros]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194002</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194002"/>
				<updated>2015-04-27T01:29:28Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Feedback */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora by Miguel Correia]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg, by Ibéria Medeiros]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194001</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194001"/>
				<updated>2015-04-27T01:28:30Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events and Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora by Miguel Correia]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg, by Ibéria Medeiros]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''. Apr 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP). March 2015.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194000</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=194000"/>
				<updated>2015-04-27T01:27:17Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events and Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora by Miguel Correia]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg, by Ibéria Medeiros]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]. Miguel Correia presented the comunication: '''''Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool'''''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]. Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Publications===&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193999</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193999"/>
				<updated>2015-04-27T01:24:05Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events and Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora by Miguel Correia]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg, by Ibéria Medeiros]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
Miguel Correia presented the comunication: Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg]&lt;br /&gt;
Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193998</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193998"/>
				<updated>2015-04-27T01:22:43Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* Events and Publications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora by Miguel Correia]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg, by Ibéria Medeiros]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
*[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora]&amp;lt;br/&amp;gt;&lt;br /&gt;
Miguel Correia presented the comunication: Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg, by Ibéria Medeiros]&amp;lt;br/&amp;gt;&lt;br /&gt;
Ibéria Medeiros presented WAP and realized a lab in the Intensive Study Programmed (ISP)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193997</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193997"/>
				<updated>2015-04-27T01:14:25Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora by Miguel Correia]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg, by Ibéria Medeiros]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193996</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193996"/>
				<updated>2015-04-27T01:13:54Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
=Events and Publications=&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193995</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193995"/>
				<updated>2015-04-27T01:12:56Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
=News=&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193994</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193994"/>
				<updated>2015-04-27T01:11:31Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Iberiam&amp;diff=193993</id>
		<title>User:Iberiam</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Iberiam&amp;diff=193993"/>
				<updated>2015-04-27T01:04:48Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;font-size:100%;border:none;margin: 0;color:#000&amp;quot;&amp;gt;&lt;br /&gt;
Ibéria Medeiros is Assistant Professor of the Universidade dos Açores (UAc), in Açores, Portugal.&lt;br /&gt;
I am a Ph.D student in Informatics at the Faculdade de Ciências of Universidade de Lisboa. My adivsors are [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia] and [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]. My research area is software security and my work is about detection and correction of web applications vulnerabilities. Since my master degree I have been working in source code static analysis, more precisely taint analysis, to detect vulnerabilities in source code. I have also been using data mining and machine learning to refine the detection made by taint analysis and to minimize the false positives rate.&lt;br /&gt;
&lt;br /&gt;
I am also a researcher at LaSIGE research unit and member of the Navigators Group. My mains research interests are software security, security, computer networks, cloud computing, machine learning, data mining and natural language processing.&lt;br /&gt;
&lt;br /&gt;
In 2008 I have finished my M.Sc on Detection of Integer Vulnerabilities in Software Portability from 32 to 64 bits, advised by Professor Miguel Pupo Correia. My thesis' contribution was a study on integer vulnerabilities in applications written in C language when they are ported from 32 to 64 bits, without any code adaptations. The main idea was use source code static analysis, using taint analysis, to find this type of vulnerabilities that originate, for example, buffer overflows, if any adaption in source code of applications written to 32 bits processors is not realized and these applications are ported to 64 bits processors.&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
More information about me at [https://sites.google.com/site/ibemed/ https://sites.google.com/site/ibemed/]. &amp;lt;br/&amp;gt;&lt;br /&gt;
email: [mailto:iberia.medeiros@owasp.org| iberia.medeiros@owasp.org]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
==Projects==&lt;br /&gt;
===[[OWASP WAP-Web Application Protection]]===&lt;br /&gt;
[[Image:wap_1_33.jpg|94px|wap_1_33.jpg.jpg]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* A security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Iberiam&amp;diff=193992</id>
		<title>User:Iberiam</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Iberiam&amp;diff=193992"/>
				<updated>2015-04-27T01:04:06Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;font-size:100%;border:none;margin: 0;color:#000&amp;quot;&amp;gt;&lt;br /&gt;
Ibéria Medeiros is Assistant Professor of the Universidade dos Açores (UAc), in Açores, Portugal.&lt;br /&gt;
I am a Ph.D student in Informatics at the Faculdade de Ciências of Universidade de Lisboa. My adivsors are [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia] and [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]. My research area is software security and my work is about detection and correction of web applications vulnerabilities. Since my master degree I have been working in source code static analysis, more precisely taint analysis, to detect vulnerabilities in source code. I have also been using data mining and machine learning to refine the detection made by taint analysis and to minimize the false positives rate.&lt;br /&gt;
&lt;br /&gt;
I am also a researcher at LaSIGE research unit and member of the Navigators Group. My mains research interests are software security, security, computer networks, cloud computing, machine learning, data mining and natural language processing.&lt;br /&gt;
&lt;br /&gt;
In 2008 I have finished my M.Sc on Detection of Integer Vulnerabilities in Software Portability from 32 to 64 bits, advised by Professor Miguel Pupo Correia. My thesis' contribution was a study on integer vulnerabilities in applications written in C language when they are ported from 32 to 64 bits, without any code adaptations. The main idea was use source code static analysis, using taint analysis, to find this type of vulnerabilities that originate, for example, buffer overflows, if any adaption in source code of applications written to 32 bits processors is not realized and these applications are ported to 64 bits processors.&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
More information about me at [https://sites.google.com/site/ibemed/ https://sites.google.com/site/ibemed/]. &amp;lt;br/&amp;gt;&lt;br /&gt;
email: [mailto:iberia.medeiros@owasp.org|iberia.medeiros@owasp.org]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
==Projects==&lt;br /&gt;
===[[OWASP WAP-Web Application Protection]]===&lt;br /&gt;
[[Image:wap_1_33.jpg|94px|wap_1_33.jpg.jpg]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* A security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193991</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193991"/>
				<updated>2015-04-27T00:58:21Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: Undo revision 193990 by Iberiam (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193990</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193990"/>
				<updated>2015-04-27T00:55:37Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[dsfsf]&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193989</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193989"/>
				<updated>2015-04-27T00:55:02Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: Undo revision 193981 by Iberiam (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193988</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193988"/>
				<updated>2015-04-27T00:53:05Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: Undo revision 193982 by Iberiam (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:ibemed@gmail.com email].&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193987</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193987"/>
				<updated>2015-04-27T00:31:53Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193986</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193986"/>
				<updated>2015-04-27T00:31:38Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora by Miguel Correia]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://paris-isp.uni.lu WAP in ParIS - ISP at University of Luxembourg, by Ibéria Medeiros]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193985</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193985"/>
				<updated>2015-04-27T00:27:26Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora by Miguel Correia]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in ParIS - ISP at University of Luxembourg, by Ibéria Medeiros]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193984</id>
		<title>OWASP WAP-Web Application Protection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_WAP-Web_Application_Protection&amp;diff=193984"/>
				<updated>2015-04-27T00:26:13Z</updated>
		
		<summary type="html">&lt;p&gt;Iberiam: /* News and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
Instructions are in RED text and should be removed from your document by deleting the text with the span tags. This document is intended to serve as an example of what is required of an OWASP project wiki page. The text in red serves as instructions, while the text in black serves as an example. Text in black is expected to be replaced entirely with information specific to your OWASP project.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==OWASP WAP - Web Application Protection Project==&lt;br /&gt;
WAP is a tool to detect and correct input validation vulnerabilities in web applications written in PHP and predicts false positives. The tool combines source code static analysis and data mining to detect vulnerabilities and predict false positives. Then, corrects the source code to remove the real vulnerabilities inserting fixes (small functions) in the right places of the source e code.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
* OWASP WAP is a security tool to detect and remove input validation vulnerabilities in web applications, and predict false positives.&lt;br /&gt;
* Uses source code static analysis to detect vulnerabilities, data mining to predict false positives and inserts fixes to correct the source code.&lt;br /&gt;
* Detects and corrects 8 types of input validation vulnerabilities.&lt;br /&gt;
* Teaches the user to build secure software.&lt;br /&gt;
* Works on Linux, Macintosh and Windows.&lt;br /&gt;
* Requires JRE to run.&lt;br /&gt;
* Portable, ready to run and no installation required.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you need to add your more robust project description. A project description should outline the purpose of the project, how it is used, and the value it provides to application security. Ideally, project descriptions should be written in such a way that there is no question what value the project provides to the software security community. This section will be seen and used in various places within the Projects Portal. Poorly written project descriptions therefore detract from a project’s visibility, so project leaders should ensure that the description is meaningful.  &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
WAP is a source code static analysis and data mining tool to detect and correct input validation vulnerabilities in web applications written in PHP (version 4.0 or higher) with a low rate of false positives.&lt;br /&gt;
&lt;br /&gt;
WAP detects and corrects the following vulnerabilities:&lt;br /&gt;
* SQL Injection (SQLI)&lt;br /&gt;
* Cross-site scripting (XSS)&lt;br /&gt;
* Remote File Inclusion (RFI)&lt;br /&gt;
* Local File Inclusion (LFI)&lt;br /&gt;
* Directory Traversal or Path Traversal (DT/PT)&lt;br /&gt;
* Source Code Disclosure (SCD)&lt;br /&gt;
* OS Command Injection (OSCI)&lt;br /&gt;
* PHP Code Injection&lt;br /&gt;
&lt;br /&gt;
This tool semantically analyses the source code. More precisely, it does taint analysis (data-flow analysis) to detect the input validation vulnerabilities. The aim of the taint analysis is to track malicious inputs inserted by entry points ($_GET, $_POST arrays) and to verify if they reach some sensitive sink (PHP functions that can be exploited by malicious input, such as mysql_query). After the detection, the tool uses data mining to confirm if the vulnerabilities are real or false positives. At the end, the real vulnerabilities are corrected by the insertion of the fixes (small pieces of code) in the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAP is constituted by three modules:&lt;br /&gt;
* Code Analyzer: composed by tree generator and taint analyser. The tool has integrated a lexer and a parser generated by ANTLR, and based in a grammar and a tree grammar written to PHP language. The tree generator uses the lexer and the parser to build the AST (Abstract Sintatic Tree) to each PHP file. The taint analyzer performs the taint analysis navigating through the AST to detect potentials vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* False Positives Predictor: composed by a supervised trained data set with instances classified as being vulnerabilities and false positives and by the Logistic Regression machine learning algorithm. For each potential vulnerability detected by code analyser, this module collects the presence of the attributes that define a false positive and creates with them an instance. Then, the Logistic Regression algorithm receives the instances and classifies them as being a false positive or not (real vulnerability).&lt;br /&gt;
&lt;br /&gt;
* Code Corrector: each real vulnerability is removed by correction of its source code. This module for the type of vulnerability selects the fix that removes the vulnerability and signalizes the places in the source code where the fix will be inserted. Then, the code is corrected with the insertion of the fixes and new files are created. Fixes are small pieces of the code (small PHP functions developed to the effect) that performing sanitization or validation of the user inputs, depending of the vulnerability type.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify it under the terms of the [http://www.gnu.org/licenses/agpl-3.0.html link GNU Affero General Public License 3.0] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.    &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== Project Resources ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to the key locations for project files, including setup programs, the source code repository, online documentation, a Wiki Home Page, threaded discussions about the project, and Issue Tracking system, etc. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&amp;lt;!-- [http://sourceforge.net/projects/awap/ http://sourceforge.net/projects/awap/] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Leader ==&lt;br /&gt;
[[User:iberiam| Ibéria Medeiros]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[mailto:ibemed@gmail.com Email]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://sites.google.com/site/ibemed/ Homepage]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Projects ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can link to other OWASP Projects that are similar to yours. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_TOOL.jpg|link=https://www.owasp.org/index.php/Category:OWASP_Tool]]&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:Owasp-incubator-trans-85.png|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects|Incubator Project]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-builders-small.png|link=Builders]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=Breakers]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Agplv3-155x51.png|link=http://www.gnu.org/licenses/agpl-3.0.html|Affero General Public License 3.0]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	This is where you can provide project updates, links to any events like conference presentations, Project Leader interviews, case studies on successful project implementations, and articles written about your project. &lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in 4th SCT of University of Évora by Miguel Correia]&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://www.facebook.com/semanadascienciasetecnologiasaaue/photos/pb.701934916585847.-2207520000.1430093295./720636151382390/?type=3&amp;amp;theater WAP in ParIS - ISP at University of Luxembourg, by Ibéria Medeiros]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cyber-attacks againts PHP Web Applications and How avoid them with the WAP tool&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Instructions are in RED and should be removed from your document by deleting the text with the span tags.--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
	Many projects have &amp;quot;Frequently Asked Questions&amp;quot; documents or pages. However, the point of such a document is not the questions. ''The point of a document like this are the '''answers'''''. The document contains the answers that people would otherwise find themselves giving over and over again. The idea is that rather than laboriously compose and post the same answers repeatedly, people can refer to this page with pre-prepared answers. Use this space to communicate your projects 'Frequent Answers.'&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None, for now...&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
==Contributors==&lt;br /&gt;
OWASP WAP - Web Application Protection is brought to you by OWASP, a free and open software security community focusing on improving the security of software. Our goal with OWASP WAP project is to build secure software, by the detection of web application vulnerabilities and removing of them by the correction of web application source code. &lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
OWASP WAP - Web Application Protection project is led by [[user:iberiam| Ibéria Medeiros]], a software security developer and enthusiast.&lt;br /&gt;
&lt;br /&gt;
==Volunteers==&lt;br /&gt;
The project is free and open source, and if you want to join to the development team, please contact the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
We would like to thank the following people and organizations for their support:&lt;br /&gt;
* [http://www.gsd.inesc-id.pt/~mpc/ Professor Miguel P. Correia]&lt;br /&gt;
* [http://www.di.fc.ul.pt/~nuno/ Professor Nuno Neves]&lt;br /&gt;
* EC through project FP7-607109 (SEGRID), and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 (INESC-ID) and UID/CEC/00408/2013 (LaSIGE).&lt;br /&gt;
[[Image:FCT_H_color_v2011.png|FCT_H_color_v2011.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* [mailto:ibemed@gmail.com Ibéria Medeiros]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
The main goals are: &lt;br /&gt;
# Demonstrate using the tool that there is a lack of software security in the development of web applications,&lt;br /&gt;
# Help programmers learn the need of secure codding practices, which are the practices and how they are implemented. &lt;br /&gt;
# Help programmers learn how to build secure software.&lt;br /&gt;
# Become a test bed for analyzing the QoS security of source code of web application.&lt;br /&gt;
# Become a tool to teach software security in web application in a class room/lab environment.&lt;br /&gt;
# Attract people to extend the WAP tool to detect and correct new types of vulnerabilities,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The phases of development of the WAP tool:&lt;br /&gt;
&lt;br /&gt;
1. Build a PHP parser to create an abstract syntax tree (AST).&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Detect candidate vulnerabilities using taint analysis under the AST.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two phases can be improved by implementing the new characteristics of the PHP language, such as of object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Predict if the candidate vulnerabilities are false positives or not, using for this data mining with a defined training data set.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This phase could be modified if the training data set grows vertically and/or horizontally, i.e. more instances are included and/or new attributes that characterize false positives are added to the instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Correct the source code, removing the real vulnerabilities inserting fixes in the right places of the source code.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: partially concluded)&amp;lt;br/&amp;gt;&lt;br /&gt;
This task needs some improvements when the line of the source code occupy more than 1 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Output the results: vulnerabilities found, its correction and the new corrected files; and the false positives predicted.&amp;lt;br/&amp;gt;&lt;br /&gt;
(progress: concluded)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
Involvement in the development and promotion of OWASP WAP is actively encouraged!&lt;br /&gt;
You do not have to be a security expert in order to contribute. &lt;br /&gt;
Some of the ways you can help:&lt;br /&gt;
* Spread the word - Facebook, Twitter, Google+ or any other communication platform.&lt;br /&gt;
* Write about OWASP WAP on your web site, book or blog.&lt;br /&gt;
* Make tutorials/videos of WAP tool in languages you know of.&lt;br /&gt;
* Include it in your training materials, talks, laboratories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coding===&lt;br /&gt;
You can also help if you wish to extend the WAP tool with a new module or even improving some part(s) of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback should be sent to the project leader by sending her an [mailto:iberia.medeiros@owasp.org email].&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
The delivery of the project is a zip or tar.gz file containing:&lt;br /&gt;
* a jar file with the WAP tool;&lt;br /&gt;
* plain text file with the indications how to install and use the tool;&lt;br /&gt;
* vulnerable PHP example files to demonstrate how to work the tool; &lt;br /&gt;
* the source code of the tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool works in different operating systems -- Linux, OSx and Windows -- and is available at [http://awap.sourceforge.net http://awap.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
The requirements to run the tool are only the JRE (Java Runtime Enviroment), which can be downloaded at [http://www.oracle.com/us/downloads/index.html#menu-downloads http://www.oracle.com].&lt;br /&gt;
&lt;br /&gt;
No installation required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Tool]]&lt;/div&gt;</summary>
		<author><name>Iberiam</name></author>	</entry>

	</feed>