Presented By: 
Shubham S. Takode 
B.TECH- TY CSE 
2012BCS518 
Department of Computer Science and Engineering , 
Shri Guru Gobind Singhji Institute of Engineering and Technology, Vishnupuri, 
Nanded. 1
 What is Hacking? Website Hacking ? 
 Typical communication over Internet. 
 Types of Attacks. 
 Step By Step : 
SQL Injection Attacks. 
Session Hijacking Attacks: 
• Wireshark. 
 Hacking Facebook Account with Wireshark. 
RFI and LFI Attacks. 
 XSS Attacks. 
DDOS Attack. 
 Purpose of Hacking. 
 Preventive Measures. 
 Conclusion 
2
Hacking refers to an array of activities which are done to 
intrude some one else’s personal information space so as to 
use it for malicious, unwanted purposes. 
Hacking is a term used to refer to activities aimed at 
exploiting security flaws to obtain critical information for 
gaining access to secured networks. 
Becoming a hacker will take intelligence, practice, 
dedication, and hard work. 
3
• Unauthorized access to the Resources on Web Server. 
( RFI, LFI, Admin account password hacking ) 
• Changing the contents on Webpage . (XSS Attacks) 
• Hacking User Accounts on typical Website. 
• Sniffing data packets over network. 
(Session Hijacking and Packet Sniffing) 
4
Client 
INTERNET 
Web 
Server 
DNS 
Server 
DHCP 
Server 
Local DNS 
Server 
http://www.google.com/ 
ISP 
127. 120.120.110 
5
• SQL Injection 
• Session Hijacking or Packet Sniffing. 
• RFI ( Remote File Inclusion ) , LFI ( Local File 
Inclusion ). 
• XSS Attacks. 
• DDOS ( Distributed Denial of Service ) Attack. 
6
• All about SQL Queries and vulnerable URL. 
• Aim is to find the name and structure of your database 
and then step by step extract data from Database. 
•For this hackers uses various sql commands, string parsing 
functions and try to make query result true. 
• Extracted data could be anything stored in your db. 
• Username , Passwords 
• Emails 
• Credit Card Information , Personal Information 
7
• Consider you wants to build a login page for your website as 
shown here 
8
• Consider database table as show below: 
userid user_name Password 
1 shubham shubham 
2 anand anand 
Table : site_user 
9
Consider php backend for login validation check as show below: 
<?php 
session_start(); 
include 'db.inc.php'; 
mysql_select_db("user",$con) or die(mysql_error($con)); 
if(isset($_POST['submit'])) 
{ 
if(!isset($_SESSION['logged']) || $_SESSION['logged'] != 1) 
{ 
if(!empty($_POST['username']) && !empty($_POST['password'])) 
{ 
$query="SELECT * FROM site_user WHERE 
user_name='".$_POST['username']."' AND password='".$_POST['password']."'"; 
$result=mysql_query($query,$con) or die("<center><br><br><b>USER NOT 
FOUND</b><br><br>".mysql_error()."</center>"); 
if(!$row = mysql_fetch_assoc($result)) { echo"<script>alert('Wrong User 
Credentials ... Please Retry....');</script>";} 
else {echo "<script>alert(' Hii there ... You are logged in Sussessfully'); 
</script>";} 
} 
} 
} 
?> 
10
• The login page we have just designed is vulnerable to sql 
injection attack. 
• If user enters correct username and password on login page 
then page will show alert message as “Hi there… You have logged 
in successfully ”. 
•If user enters wrong username and password then page will 
show alert message as “Wrong User Credentials … Please Retry”. 
•Now if user enters username as any string and password as “ 
' or '1'= '1 ” 
then the page is showing “Hi there… You have logged in 
successfully ” . 
11
• This is the SQL Injection . Evens if the logic we have 
written at backend is correct , the output we are getting is 
not valid. 
• Why this happens ? Next.. 
12
• It’s happening because of the input in the password field 
making the sql query to be a true (valid) and that why it is 
executing and returning the a valid result. 
• Actual Query (when we enter valid or wrong input in login 
form): 
SELECT * FROM site_user WHERE user_name=‘shubham' 
AND password=‘shubham’; 
• Query with input ‘ or ‘1’ = ‘1 : 
SELECT * FROM site_user WHERE user_name=‘anything' 
AND password=‘’ or ‘1’=‘1’ ; 
13
• As per our login page backend login “Things are getting 
valid /true line by line” because the query is returning 
valid output. 
• 
14
• Aim is to capture the packets / data / cookie / session by 
using packet sniffing tools such as WireShark. 
• Hackers takes advantage of stateless nature of HTTP. 
• They capture the packets flowing across network, extracts 
data from packets and inject required data such as cookies 
and browser state in their own browser and due to this Web 
Servers unable to differentiate between hacker and actual 
user. 
15
• Hacker requires packet sniffing tools such as WireShark 
• Hacker need to connect to the local network in which 
the user is also connected. 16
• Consider any websites such as Facebook , Gmail, Yahoo Mail 
which uses cookies for tracking user (As HTTP is stateless Web 
Servers needs to track users for indentification). 
• To be specific we will consider Facebook. 
• Suppose you logged in successfully on your facebook account 
using some wifi access point. 
• When you logs in on your facebook account, the Facebook 
Servers sets cookies with names “ datr” and “cuser” which are 
used to indentify you and track your sessions on server. 
17
• With each request (GET/POST) this cookies are sent in 
headers of request back to facebook server and facebooks 
server matches those values of cookies with the one that on 
the server and if match found then your request is served 
otherwise not. 
• So if anyone able to access this cookies then he/she can 
easily logged in to your account. 
• When we are accessing internet through any local 
networks such as Wifi Hotspots or Cyber Cafes then this 
network uses broadcast mechanism for moving data across 
any node in the network. 
18
• In broadcast network mechanism data packet moves across 
the whole network that is even if the packet is not for your PC 
(Node) still it comes to your PC and you can even capture it. 
• This flowing packets contains data such as PROTOCOL 
HEADERS , COOKIES . 
• The packets flows underneath of domain. 
• Softwares such as Wireshark are able to capture such 
flowing packet and Hacker uses such softwares for sniffing 
your cookies. 
• Once hacker gets your cookie he/she just need to inject 
those cookies in the browser and once page is refreshed 
hacker gets logged in to your account. 19
20
21
22
• Both are old method. 
• Aim is to upload .php , .asp , .sh script on server and execute 
those script. 
• RFI 
Consider url 
http://downloadlabss.com/p?u=http://www.pragyaa.org/q/1.txt 
It means resource on one server is accessible/executable on 
other server 
• LFI 
• Vulnerable Upload Servers 
23
• A Play with JavaScript and vulnerable backend logic. 
• Example: A Comment Box Hack. 
24
•Worlds most powerful attack technique. 
• DDOS stands for Distributed Denial of Service Attack 
• More than one Users (PCs) are involved. 
• Whole server may crash down. 
• Idea is to take control of hundreds of PCs on Internet and 
send bulk request to target server. 
25
• Sometimes uses Exponential Approach 
Hacker’s 
Server 
Network 
Server 1 
Network 
Server m 
Network 
with 
X1 PCs 
Network 
with 
X2 PCs 
Target 
Server 
Bulk Requests 
26
• To stole information and sale it. 
• Spying by different Government Agencies for sake of 
international or national politics . 
• Getting access to money resources .. Bank accounts , share 
markets and commodity markets accounts. 
• To become world famous. 
• Just for the fun. 
27
• For SQL Injection : 
• Use mysql_string_parse( ) function. 
• Avoid use of urls from which backend logic accesses 
data directly. 
• Parse or validate input data in well manner. 
• Use POST method for sending data. 
• Use latest version of PHP and MY_SQL. 
• For Session Hijacking : 
• Use SSL / HTTPS connection which encrypts data 
flowing across network 
• Avoid use of cookie , use session instead to track 
user 
• Encrypt cookies 28
• For RFI and LFI Attacks : 
• Use proxy servers instead of using PROXY SERVER 
SOFTWARE (As a Web App). 
• Develop a mechanism to parse the contents received 
from other servers. 
• Improve business logic. 
• For XSS Attacks : 
•Well parse the user inputs . 
• For DDOS Attacks: 
• Use firewalls and antivirus programs. 
• Avoid giving major permission to websites. 
•Block IPs on server which send bulk request. 
29
Developers thinks that once web application is developed 
then work is finished but this is not true for web apps. In 
case of web apps maintenance is much more important and 
things are need to be well updated, if not so then single 
hole of vulnerability may crash down your whole web app 
and servers. 
Be careful !!!! 
30
31
32

More Related Content

PPTX
Web site hacking;what does it mean
PPT
Hacking A Web Site And Secure Web Server Techniques Used
PPTX
Website hacking and prevention (All Tools,Topics & Technique )
PPTX
Web application attacks
PPTX
Presentation on Web Attacks
PPTX
Help AG spot light - social engineering
PPTX
Web Security Attacks
PPT
Web site hacking;what does it mean
Hacking A Web Site And Secure Web Server Techniques Used
Website hacking and prevention (All Tools,Topics & Technique )
Web application attacks
Presentation on Web Attacks
Help AG spot light - social engineering
Web Security Attacks

What's hot (20)

PDF
Web Security: A Primer for Developers
PDF
Web Security 101
PPTX
Rapid Android Application Security Testing
PPTX
Lesson 6 web based attacks
PDF
Web Security - Introduction v.1.3
PPTX
Finding the source of Ransomware - Wire data analytics
PPT
PDF
Web App Security Presentation by Ryan Holland - 05-31-2017
PPTX
A5: Security Misconfiguration
PPTX
Php security common 2011
PPTX
Securing the Web @DevDay Da Nang 2018
PPTX
Secure Code Warrior - Authentication
PPT
Web security presentation
PPS
Information Gathering With Google
PPTX
Vulnerabilities in modern web applications
PDF
2013 OWASP Top 10
PPT
Pentesting web applications
PPT
Starwest 2008
PDF
Introduction to Web Application Security - Blackhoodie US 2018
PDF
Top 10 Web Application vulnerabilities
Web Security: A Primer for Developers
Web Security 101
Rapid Android Application Security Testing
Lesson 6 web based attacks
Web Security - Introduction v.1.3
Finding the source of Ransomware - Wire data analytics
Web App Security Presentation by Ryan Holland - 05-31-2017
A5: Security Misconfiguration
Php security common 2011
Securing the Web @DevDay Da Nang 2018
Secure Code Warrior - Authentication
Web security presentation
Information Gathering With Google
Vulnerabilities in modern web applications
2013 OWASP Top 10
Pentesting web applications
Starwest 2008
Introduction to Web Application Security - Blackhoodie US 2018
Top 10 Web Application vulnerabilities

Viewers also liked (20)

PPTX
Hacking & its types
PPSX
Hacking
PPTX
Hacking ppt
PPTX
Session hijacking
PDF
Ethical Hacking & IT Security Courses in SIFS
PPT
Day3 Backup
PPTX
Cyber security and Hacking
PPTX
Session hijacking
PPTX
PPT
It security &_ethical_hacking
PDF
y3dips hacking priv8 network
PDF
How to become a hacker
PPTX
What The Heck Is Hacking?
PDF
PDF
Advanced growth hacking
PPTX
Ethical Hacking & Network Security
PDF
Advanced Web Hacking (EUSecWest 06)
PPTX
Travel Hacking 101
PPTX
Ethical Hacking
PDF
Hacking Journalism: Using the Internet to Save the World
Hacking & its types
Hacking
Hacking ppt
Session hijacking
Ethical Hacking & IT Security Courses in SIFS
Day3 Backup
Cyber security and Hacking
Session hijacking
It security &_ethical_hacking
y3dips hacking priv8 network
How to become a hacker
What The Heck Is Hacking?
Advanced growth hacking
Ethical Hacking & Network Security
Advanced Web Hacking (EUSecWest 06)
Travel Hacking 101
Ethical Hacking
Hacking Journalism: Using the Internet to Save the World

Similar to Website Hacking and Preventive Measures (20)

PDF
Lets Make our Web Applications Secure
PDF
OWASPTop 10
PPTX
Types of cyber attacks
PDF
Secure Coding BSSN Semarang Material.pdf
PDF
Common Web Application Attacks
PPTX
webapplicationattacks-101005070110-phpapp02.pptx
PPTX
Solving Labs for Vulnerabilities: Login Bypass & SQL Injection Exploits
PPTX
6 - Web Application Security.pptx
PPTX
Security Testing Training With Examples
PPTX
Hack using firefox
PPTX
TYPES OF CYBER ATTACKS.pptx
PDF
The top 10 security issues in web applications
PPTX
Types of Cyber Attacks
PDF
Hacking sites for fun and profit
PPTX
State of the information security nation
PDF
Recent cyber Attacks
PDF
Advanced web application hacking and exploitation
PPTX
Mutillidae and the OWASP Top 10 by Adrian Crenshaw aka Irongeek
PPTX
Ethical Hacking Techniques for Web Application Security
PPT
Hacking web applications
Lets Make our Web Applications Secure
OWASPTop 10
Types of cyber attacks
Secure Coding BSSN Semarang Material.pdf
Common Web Application Attacks
webapplicationattacks-101005070110-phpapp02.pptx
Solving Labs for Vulnerabilities: Login Bypass & SQL Injection Exploits
6 - Web Application Security.pptx
Security Testing Training With Examples
Hack using firefox
TYPES OF CYBER ATTACKS.pptx
The top 10 security issues in web applications
Types of Cyber Attacks
Hacking sites for fun and profit
State of the information security nation
Recent cyber Attacks
Advanced web application hacking and exploitation
Mutillidae and the OWASP Top 10 by Adrian Crenshaw aka Irongeek
Ethical Hacking Techniques for Web Application Security
Hacking web applications

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Five Habits of High-Impact Board Members
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Hybrid model detection and classification of lung cancer
PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
CloudStack 4.21: First Look Webinar slides
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Modernising the Digital Integration Hub
PDF
A review of recent deep learning applications in wood surface defect identifi...
PPTX
Chapter 5: Probability Theory and Statistics
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Getting Started with Data Integration: FME Form 101
PDF
Architecture types and enterprise applications.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Five Habits of High-Impact Board Members
Final SEM Unit 1 for mit wpu at pune .pptx
Hybrid model detection and classification of lung cancer
Getting started with AI Agents and Multi-Agent Systems
observCloud-Native Containerability and monitoring.pptx
CloudStack 4.21: First Look Webinar slides
A novel scalable deep ensemble learning framework for big data classification...
Benefits of Physical activity for teenagers.pptx
NewMind AI Weekly Chronicles – August ’25 Week III
Univ-Connecticut-ChatGPT-Presentaion.pdf
Modernising the Digital Integration Hub
A review of recent deep learning applications in wood surface defect identifi...
Chapter 5: Probability Theory and Statistics
A contest of sentiment analysis: k-nearest neighbor versus neural network
Group 1 Presentation -Planning and Decision Making .pptx
Enhancing emotion recognition model for a student engagement use case through...
Getting Started with Data Integration: FME Form 101
Architecture types and enterprise applications.pdf

Website Hacking and Preventive Measures

  • 1. Presented By: Shubham S. Takode B.TECH- TY CSE 2012BCS518 Department of Computer Science and Engineering , Shri Guru Gobind Singhji Institute of Engineering and Technology, Vishnupuri, Nanded. 1
  • 2.  What is Hacking? Website Hacking ?  Typical communication over Internet.  Types of Attacks.  Step By Step : SQL Injection Attacks. Session Hijacking Attacks: • Wireshark.  Hacking Facebook Account with Wireshark. RFI and LFI Attacks.  XSS Attacks. DDOS Attack.  Purpose of Hacking.  Preventive Measures.  Conclusion 2
  • 3. Hacking refers to an array of activities which are done to intrude some one else’s personal information space so as to use it for malicious, unwanted purposes. Hacking is a term used to refer to activities aimed at exploiting security flaws to obtain critical information for gaining access to secured networks. Becoming a hacker will take intelligence, practice, dedication, and hard work. 3
  • 4. • Unauthorized access to the Resources on Web Server. ( RFI, LFI, Admin account password hacking ) • Changing the contents on Webpage . (XSS Attacks) • Hacking User Accounts on typical Website. • Sniffing data packets over network. (Session Hijacking and Packet Sniffing) 4
  • 5. Client INTERNET Web Server DNS Server DHCP Server Local DNS Server http://www.google.com/ ISP 127. 120.120.110 5
  • 6. • SQL Injection • Session Hijacking or Packet Sniffing. • RFI ( Remote File Inclusion ) , LFI ( Local File Inclusion ). • XSS Attacks. • DDOS ( Distributed Denial of Service ) Attack. 6
  • 7. • All about SQL Queries and vulnerable URL. • Aim is to find the name and structure of your database and then step by step extract data from Database. •For this hackers uses various sql commands, string parsing functions and try to make query result true. • Extracted data could be anything stored in your db. • Username , Passwords • Emails • Credit Card Information , Personal Information 7
  • 8. • Consider you wants to build a login page for your website as shown here 8
  • 9. • Consider database table as show below: userid user_name Password 1 shubham shubham 2 anand anand Table : site_user 9
  • 10. Consider php backend for login validation check as show below: <?php session_start(); include 'db.inc.php'; mysql_select_db("user",$con) or die(mysql_error($con)); if(isset($_POST['submit'])) { if(!isset($_SESSION['logged']) || $_SESSION['logged'] != 1) { if(!empty($_POST['username']) && !empty($_POST['password'])) { $query="SELECT * FROM site_user WHERE user_name='".$_POST['username']."' AND password='".$_POST['password']."'"; $result=mysql_query($query,$con) or die("<center><br><br><b>USER NOT FOUND</b><br><br>".mysql_error()."</center>"); if(!$row = mysql_fetch_assoc($result)) { echo"<script>alert('Wrong User Credentials ... Please Retry....');</script>";} else {echo "<script>alert(' Hii there ... You are logged in Sussessfully'); </script>";} } } } ?> 10
  • 11. • The login page we have just designed is vulnerable to sql injection attack. • If user enters correct username and password on login page then page will show alert message as “Hi there… You have logged in successfully ”. •If user enters wrong username and password then page will show alert message as “Wrong User Credentials … Please Retry”. •Now if user enters username as any string and password as “ ' or '1'= '1 ” then the page is showing “Hi there… You have logged in successfully ” . 11
  • 12. • This is the SQL Injection . Evens if the logic we have written at backend is correct , the output we are getting is not valid. • Why this happens ? Next.. 12
  • 13. • It’s happening because of the input in the password field making the sql query to be a true (valid) and that why it is executing and returning the a valid result. • Actual Query (when we enter valid or wrong input in login form): SELECT * FROM site_user WHERE user_name=‘shubham' AND password=‘shubham’; • Query with input ‘ or ‘1’ = ‘1 : SELECT * FROM site_user WHERE user_name=‘anything' AND password=‘’ or ‘1’=‘1’ ; 13
  • 14. • As per our login page backend login “Things are getting valid /true line by line” because the query is returning valid output. • 14
  • 15. • Aim is to capture the packets / data / cookie / session by using packet sniffing tools such as WireShark. • Hackers takes advantage of stateless nature of HTTP. • They capture the packets flowing across network, extracts data from packets and inject required data such as cookies and browser state in their own browser and due to this Web Servers unable to differentiate between hacker and actual user. 15
  • 16. • Hacker requires packet sniffing tools such as WireShark • Hacker need to connect to the local network in which the user is also connected. 16
  • 17. • Consider any websites such as Facebook , Gmail, Yahoo Mail which uses cookies for tracking user (As HTTP is stateless Web Servers needs to track users for indentification). • To be specific we will consider Facebook. • Suppose you logged in successfully on your facebook account using some wifi access point. • When you logs in on your facebook account, the Facebook Servers sets cookies with names “ datr” and “cuser” which are used to indentify you and track your sessions on server. 17
  • 18. • With each request (GET/POST) this cookies are sent in headers of request back to facebook server and facebooks server matches those values of cookies with the one that on the server and if match found then your request is served otherwise not. • So if anyone able to access this cookies then he/she can easily logged in to your account. • When we are accessing internet through any local networks such as Wifi Hotspots or Cyber Cafes then this network uses broadcast mechanism for moving data across any node in the network. 18
  • 19. • In broadcast network mechanism data packet moves across the whole network that is even if the packet is not for your PC (Node) still it comes to your PC and you can even capture it. • This flowing packets contains data such as PROTOCOL HEADERS , COOKIES . • The packets flows underneath of domain. • Softwares such as Wireshark are able to capture such flowing packet and Hacker uses such softwares for sniffing your cookies. • Once hacker gets your cookie he/she just need to inject those cookies in the browser and once page is refreshed hacker gets logged in to your account. 19
  • 20. 20
  • 21. 21
  • 22. 22
  • 23. • Both are old method. • Aim is to upload .php , .asp , .sh script on server and execute those script. • RFI Consider url http://downloadlabss.com/p?u=http://www.pragyaa.org/q/1.txt It means resource on one server is accessible/executable on other server • LFI • Vulnerable Upload Servers 23
  • 24. • A Play with JavaScript and vulnerable backend logic. • Example: A Comment Box Hack. 24
  • 25. •Worlds most powerful attack technique. • DDOS stands for Distributed Denial of Service Attack • More than one Users (PCs) are involved. • Whole server may crash down. • Idea is to take control of hundreds of PCs on Internet and send bulk request to target server. 25
  • 26. • Sometimes uses Exponential Approach Hacker’s Server Network Server 1 Network Server m Network with X1 PCs Network with X2 PCs Target Server Bulk Requests 26
  • 27. • To stole information and sale it. • Spying by different Government Agencies for sake of international or national politics . • Getting access to money resources .. Bank accounts , share markets and commodity markets accounts. • To become world famous. • Just for the fun. 27
  • 28. • For SQL Injection : • Use mysql_string_parse( ) function. • Avoid use of urls from which backend logic accesses data directly. • Parse or validate input data in well manner. • Use POST method for sending data. • Use latest version of PHP and MY_SQL. • For Session Hijacking : • Use SSL / HTTPS connection which encrypts data flowing across network • Avoid use of cookie , use session instead to track user • Encrypt cookies 28
  • 29. • For RFI and LFI Attacks : • Use proxy servers instead of using PROXY SERVER SOFTWARE (As a Web App). • Develop a mechanism to parse the contents received from other servers. • Improve business logic. • For XSS Attacks : •Well parse the user inputs . • For DDOS Attacks: • Use firewalls and antivirus programs. • Avoid giving major permission to websites. •Block IPs on server which send bulk request. 29
  • 30. Developers thinks that once web application is developed then work is finished but this is not true for web apps. In case of web apps maintenance is much more important and things are need to be well updated, if not so then single hole of vulnerability may crash down your whole web app and servers. Be careful !!!! 30
  • 31. 31
  • 32. 32