SlideShare une entreprise Scribd logo
1  sur  32
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

Contenu connexe

Tendances

Web Security: A Primer for Developers
Web Security: A Primer for DevelopersWeb Security: A Primer for Developers
Web Security: A Primer for DevelopersMike North
 
Rapid Android Application Security Testing
Rapid Android Application Security TestingRapid Android Application Security Testing
Rapid Android Application Security TestingNutan Kumar Panda
 
Lesson 6 web based attacks
Lesson 6 web based attacksLesson 6 web based attacks
Lesson 6 web based attacksFrank Victory
 
Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Oles Seheda
 
Finding the source of Ransomware - Wire data analytics
Finding the source of Ransomware - Wire data analyticsFinding the source of Ransomware - Wire data analytics
Finding the source of Ransomware - Wire data analyticsNetFort
 
Web App Security Presentation by Ryan Holland - 05-31-2017
Web App Security Presentation by Ryan Holland - 05-31-2017Web App Security Presentation by Ryan Holland - 05-31-2017
Web App Security Presentation by Ryan Holland - 05-31-2017TriNimbus
 
A5: Security Misconfiguration
A5: Security Misconfiguration A5: Security Misconfiguration
A5: Security Misconfiguration Tariq Islam
 
Securing the Web @DevDay Da Nang 2018
Securing the Web @DevDay Da Nang 2018Securing the Web @DevDay Da Nang 2018
Securing the Web @DevDay Da Nang 2018Sumanth Damarla
 
Secure Code Warrior - Authentication
Secure Code Warrior - AuthenticationSecure Code Warrior - Authentication
Secure Code Warrior - AuthenticationSecure Code Warrior
 
Web security presentation
Web security presentationWeb security presentation
Web security presentationJohn Staveley
 
Information Gathering With Google
Information Gathering With GoogleInformation Gathering With Google
Information Gathering With GoogleZero Science Lab
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applicationsNiyas Nazar
 
2013 OWASP Top 10
2013 OWASP Top 102013 OWASP Top 10
2013 OWASP Top 10bilcorry
 
Pentesting web applications
Pentesting web applicationsPentesting web applications
Pentesting web applicationsSatish b
 
Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Niranjanaa Ragupathy
 
Top 10 Web Application vulnerabilities
Top 10 Web Application vulnerabilitiesTop 10 Web Application vulnerabilities
Top 10 Web Application vulnerabilitiesTerrance Medina
 

Tendances (20)

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

En vedette

En vedette (20)

Hacking & its types
Hacking & its typesHacking & its types
Hacking & its types
 
Hacking
HackingHacking
Hacking
 
Hacking ppt
Hacking pptHacking ppt
Hacking ppt
 
Session hijacking
Session hijackingSession hijacking
Session hijacking
 
Ethical Hacking & IT Security Courses in SIFS
Ethical Hacking & IT Security Courses in SIFSEthical Hacking & IT Security Courses in SIFS
Ethical Hacking & IT Security Courses in SIFS
 
Day3 Backup
Day3 BackupDay3 Backup
Day3 Backup
 
Cyber security and Hacking
Cyber security and HackingCyber security and Hacking
Cyber security and Hacking
 
Session hijacking
Session hijackingSession hijacking
Session hijacking
 
Session Hijacking
Session HijackingSession Hijacking
Session Hijacking
 
It security &_ethical_hacking
It security &_ethical_hackingIt security &_ethical_hacking
It security &_ethical_hacking
 
y3dips hacking priv8 network
y3dips hacking priv8 networky3dips hacking priv8 network
y3dips hacking priv8 network
 
How to become a hacker
How to become a hackerHow to become a hacker
How to become a hacker
 
What The Heck Is Hacking?
What The Heck Is Hacking? What The Heck Is Hacking?
What The Heck Is Hacking?
 
How to Become a Hacker?
How to Become a Hacker?How to Become a Hacker?
How to Become a Hacker?
 
Advanced growth hacking
Advanced growth hackingAdvanced growth hacking
Advanced growth hacking
 
Ethical Hacking & Network Security
Ethical Hacking & Network Security Ethical Hacking & Network Security
Ethical Hacking & Network Security
 
Advanced Web Hacking (EUSecWest 06)
Advanced Web Hacking (EUSecWest 06)Advanced Web Hacking (EUSecWest 06)
Advanced Web Hacking (EUSecWest 06)
 
Travel Hacking 101
Travel Hacking 101Travel Hacking 101
Travel Hacking 101
 
Ethical Hacking
Ethical HackingEthical Hacking
Ethical Hacking
 
Hacking Journalism: Using the Internet to Save the World
Hacking Journalism: Using the Internet to Save the WorldHacking Journalism: Using the Internet to Save the World
Hacking Journalism: Using the Internet to Save the World
 

Similaire à Website Hacking and Preventive Measures

Oracle database threats - LAOUC Webinar
Oracle database threats - LAOUC WebinarOracle database threats - LAOUC Webinar
Oracle database threats - LAOUC WebinarOsama Mustafa
 
How to Test for The OWASP Top Ten
 How to Test for The OWASP Top Ten How to Test for The OWASP Top Ten
How to Test for The OWASP Top TenSecurity Innovation
 
Andrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.pptAndrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.pptSilverGold16
 
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...IBM Security
 
Web application security part 01
Web application security part 01Web application security part 01
Web application security part 01G Prachi
 
Django (Web Applications that are Secure by Default)
Django �(Web Applications that are Secure by Default�)Django �(Web Applications that are Secure by Default�)
Django (Web Applications that are Secure by Default)Kishor Kumar
 
Computer Network Case Study - bajju.pptx
Computer Network Case Study - bajju.pptxComputer Network Case Study - bajju.pptx
Computer Network Case Study - bajju.pptxShivamBajaj36
 
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...nooralmousa
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultMohammed ALDOUB
 
Drupal security
Drupal securityDrupal security
Drupal securityTechday7
 
Web & Cloud Security in the real world
Web & Cloud Security in the real worldWeb & Cloud Security in the real world
Web & Cloud Security in the real worldMadhu Akula
 
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Michael Pirnat
 
BSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysBSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysJoff Thyer
 
SQL INJECTION
SQL INJECTIONSQL INJECTION
SQL INJECTIONAnoop T
 
Defcon 25 Packet Hacking Village - Finding Your Way to Domain Access
Defcon 25 Packet Hacking Village - Finding Your Way to Domain AccessDefcon 25 Packet Hacking Village - Finding Your Way to Domain Access
Defcon 25 Packet Hacking Village - Finding Your Way to Domain Accesseightbit
 
Web and Mobile Application Security
Web and Mobile Application SecurityWeb and Mobile Application Security
Web and Mobile Application SecurityPrateek Jain
 

Similaire à Website Hacking and Preventive Measures (20)

Oracle database threats - LAOUC Webinar
Oracle database threats - LAOUC WebinarOracle database threats - LAOUC Webinar
Oracle database threats - LAOUC Webinar
 
How to Test for The OWASP Top Ten
 How to Test for The OWASP Top Ten How to Test for The OWASP Top Ten
How to Test for The OWASP Top Ten
 
Andrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.pptAndrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.ppt
 
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
 
Web application security part 01
Web application security part 01Web application security part 01
Web application security part 01
 
Django (Web Applications that are Secure by Default)
Django �(Web Applications that are Secure by Default�)Django �(Web Applications that are Secure by Default�)
Django (Web Applications that are Secure by Default)
 
Computer Network Case Study - bajju.pptx
Computer Network Case Study - bajju.pptxComputer Network Case Study - bajju.pptx
Computer Network Case Study - bajju.pptx
 
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by Default
 
Drupal security
Drupal securityDrupal security
Drupal security
 
Web & Cloud Security in the real world
Web & Cloud Security in the real worldWeb & Cloud Security in the real world
Web & Cloud Security in the real world
 
Vulnerabilities in Web Applications
Vulnerabilities in Web ApplicationsVulnerabilities in Web Applications
Vulnerabilities in Web Applications
 
Owasp Top 10 A1: Injection
Owasp Top 10 A1: InjectionOwasp Top 10 A1: Injection
Owasp Top 10 A1: Injection
 
a
aa
a
 
Lets Make our Web Applications Secure
Lets Make our Web Applications SecureLets Make our Web Applications Secure
Lets Make our Web Applications Secure
 
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
 
BSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysBSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad Guys
 
SQL INJECTION
SQL INJECTIONSQL INJECTION
SQL INJECTION
 
Defcon 25 Packet Hacking Village - Finding Your Way to Domain Access
Defcon 25 Packet Hacking Village - Finding Your Way to Domain AccessDefcon 25 Packet Hacking Village - Finding Your Way to Domain Access
Defcon 25 Packet Hacking Village - Finding Your Way to Domain Access
 
Web and Mobile Application Security
Web and Mobile Application SecurityWeb and Mobile Application Security
Web and Mobile Application Security
 

Dernier

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Dernier (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

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