Effective Python Penetration Testing by Rejah Rehim
Author:Rejah Rehim [Rehim, Rejah]
Language: eng
Format: azw3, pdf, epub
Publisher: Packt Publishing
Published: 2016-06-29T04:00:00+00:00
Cross-site scripting (XSS)
Cross-site scripting is also a type of injection attack, which occurs when attackers inject malicious attack vectors in the form of a browser-side script. This occurs when a web application uses input from a user to craft the output without validating or encoding it.
We could modify the script used to inject SQL attack vectors to test XSS injection. To verify the output response, we could search for the expected script in the response:
import mechanize url = "http://www.webscantest.com/crosstraining/aboutyou.php" browser = mechanize.Browser() attackNumber = 1 with open('XSS-vectors.txt') as f: for line in f: browser.open(url) browser.select_form(nr=0) browser["fname"] = line res = browser.submit() content = res.read() # check the attack vector is printed in the response. if content.find(line) > 0: print "Possible XXS" output = open('response/'+str(attackNumber)+'.txt', 'w') output.write(content) output.close() print attackNumber attackNumber += 1
XSS occurs when user input prints to the response without any validation. So, to check the possibility of an XSS attack, we can check the response text for the attack vector we provided. If the attack vector is present in the response without any escaping or validation there is a high possibility of XSS attack.
Download
Effective Python Penetration Testing by Rejah Rehim.pdf
Effective Python Penetration Testing by Rejah Rehim.epub
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7778)
Grails in Action by Glen Smith Peter Ledbrook(7696)
Configuring Windows Server Hybrid Advanced Services Exam Ref AZ-801 by Chris Gill(6549)
Azure Containers Explained by Wesley Haakman & Richard Hooper(6537)
Running Windows Containers on AWS by Marcio Morales(6066)
Kotlin in Action by Dmitry Jemerov(5063)
Microsoft 365 Identity and Services Exam Guide MS-100 by Aaron Guilmette(4908)
Combating Crime on the Dark Web by Nearchos Nearchou(4489)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4414)
Microsoft Cybersecurity Architect Exam Ref SC-100 by Dwayne Natwick(4322)
The Ruby Workshop by Akshat Paul Peter Philips Dániel Szabó and Cheyne Wallace(4162)
The Age of Surveillance Capitalism by Shoshana Zuboff(3948)
Python for Security and Networking - Third Edition by José Manuel Ortega(3729)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3508)
The Ultimate Docker Container Book by Schenker Gabriel N.;(3400)
Mastering Python for Networking and Security by José Manuel Ortega(3344)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3330)
Blockchain Basics by Daniel Drescher(3292)
Learn Wireshark by Lisa Bock(3245)
