Hacking for Beginners: A Step by Step Guide for you to Learn the Basics of CyberSecurity and Hacking by Nastase Ramon
Author:Nastase, Ramon [Nastase, Ramon]
Language: eng
Format: epub
Published: 2018-04-12T16:00:00+00:00
Figure 7.2
Where are the SQL injection attacks? Most often these occur when the attacker finds a "box" in which he can enter data. For example, think about a search box in which anyone can write anything.
If the back code (most often PHP) is not written properly, then the hacker can enter SQL commands that interact directly with the database, so they can extract different information .
Now I want you to think that when you interact with an "input form" (a box where you can write and send something to the server), this happens:
SELECT * FROM ? WHERE ? LIKE ‘%’;
That is, PHP language will generate such an order to interact (and search) with the database. In the place where '%' appears, it will be replaced with what you enter in that input form.
Here's an example of a SQL code that can be entered in this field (ATTENTION: it will not work for any site. I suggest using the bWAPP application and testing it):
‘ OR 1=1;--
You can try on this site (https://sqlzoo.net/hack/) to enter the SQL statement above instead of the username and password.
SQLmap (http://sqlmap.org/) is a great tool you can use to test database vulnerabilities on a site. SQLmap will do all these queries that automatically automate SQL injection for you (and even try to break the hash of the passwords you will find in the database).
I also recommend that you download and install bWAPP , a web application that contains over 100 classical vulnerabilities (including the OWASP top 10). You can practice this virtual machine (you will connect to it through the browser -> put the IP address of the virtual machine in your browser) without any problems later (you know what I was talking about in chapter 1 ... about hackers?). If you want to install bWAPP on Kali (or any other Linux or Windows distribution), I recommend that you follow these tutorials (https://www.youtube.com/watch?v=XDCZ8FC856s) .
2) XSS (Cross-Site Scripting)
When it comes to SQL injection, as you have seen, the attacker goes directly to the site and tries to gain access to his database so that he can retrieve confidential data (usernames and passwords, bank information, mail addresses, etc.). In the XSS case, things happen differently. The attacker's focus is directed at the user (the one who accesses the site), when he uses a script to attack him.
XSS supposes the injection of malware (malicious script this time) into the site (without affecting it in any way), and when accessing the site by the user, this code will be executed directly in the browser. The code is written in JavaScript, which language is executed by the browser .
The easiest way to do this is by injecting the malicious code into a comment or script that can be run automatically.
For example, the hacker can incorporate a link to a malicious JavaScript script intentionally in a comment on a blog.
XSS attacks (Cross-site scripting) can significantly damage the site's reputation by placing users' information at risk without leaving any traces of how bad it was.
Download
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(7658)
Grails in Action by Glen Smith Peter Ledbrook(7575)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6284)
Kotlin in Action by Dmitry Jemerov(4923)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3385)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3227)
Learning React: Functional Web Development with React and Redux by Banks Alex & Porcello Eve(3001)
Mastering Bitcoin: Programming the Open Blockchain by Andreas M. Antonopoulos(2747)
The Art Of Deception by Kevin Mitnick(2507)
Drugs Unlimited by Mike Power(2352)
Kali Linux - An Ethical Hacker's Cookbook: End-to-end penetration testing solutions by Sharma Himanshu(2214)
Writing for the Web: Creating Compelling Web Content Using Words, Pictures and Sound (Eva Spring's Library) by Lynda Felder(2178)
SEO 2018: Learn search engine optimization with smart internet marketing strategies by Adam Clarke(2106)
JavaScript by Example by S Dani Akash(2051)
DarkMarket by Misha Glenny(1991)
Wireless Hacking 101 by Karina Astudillo(1990)
The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution by Walter Isaacson(1939)
Full-Stack React Projects by Shama Hoque(1902)
Social Selling Mastery by Jamie Shanks(1874)
