SlideShare a Scribd company logo
1 of 39
Google Dorks
How much you are secure?
In this Lecture
• Google Dorks
• Types of Google Dorks
• SQL injection
• Types of SQL injection
• Defending against SQL injection
Google Dorks
• Google Dorks are nothing but simple
search operators that are used to
refine our search.
• A Google dork is an employee who
unknowingly exposes sensitive corporate
information on the Internet.
Google Hacking
What is Google hacking?
• Google hacking involves using advanced
operators in the google search engine to locate the
specific string of text with in search result.
• Google hacking doesn’t mean that we are going
to hack into the google website, it means we use
operators provided by google to narrow the search
results and to get the specific result as we want.
• Generally we call these operators as google dorks .
We use these dorks with the string that we want to
search.
Google hacks
• Access Secure Webpages
• Download E-books , Videos , Music and
movies for free
• Access Security Cameras
Google Dorks
• We have lot of dorks which we will discuss in this
lecture one by one.
• site
• inurl
• intitle
• allintitle
• allinurl
• filetype or ext
• allintext
• intext
Site
• site dork restricts the results to the
specified domain. We can use this
dork to find all the pages and
subdomains of the specified domain.
Example: site:yahoo.com
inurl
• inurl dork restricts the results to
site whose URL contains all the
specified phrase or word or string.
Example: inurl:admin
allinurl
• allinurl is same as inurl but with some
difference. It restricts results to sites
whose URL contains all the specified
phrases, but inurl can show sites which
contain only single word from the
phrase.
Example: allinurl: admin login
intitle
• intitle restricts results to documents
whose title contains the specified
phrase or word or string.
Example: intitle:engineering
allintitle
• allintitle is almost same as intitle with
little difference. it will restricts results to
document whose title containing all
the specified phrases or collection or
word.
Example: allintitle:engineering books
Intitle vs allintitle
filetype or ext
• It will show all the site which
contain document of the
specified type.
Example: filetype:pdf or ext:pdf
intext
• it will show all the result pages or sites
which contains the specified text or
phrase in the text of site.
Example: intext:hacking
allintext
• allintext is same as intext but it will show
that results which contain all the text
specified in the text of the page or site.
Example: allintext: software engineering
Combining multiple dorks
site:gov inurl:adminlogin
Accessing unprotected camera
inurl:view/index.shtml
Vulnerable Files
Files Containing Juicy Info
Google search: inurl:.com/configuration.php-dist
(Finds the configuration files of the PHP Database on
the server.)
Files Containing Juicy Passwords
Google search: filetype:xls “username | password”
(This search reveals usernames and/or passwords of
the xls documents.)
SQL INJECTION
In this Topic
o What are injection attacks?
o How SQL Injection Works
o Exploiting SQL Injection Bugs
o Mitigating SQL Injection
o Defending Injection Attacks
What is SQL Injection?
• SQL injection is a code injection technique that
exploits a security vulnerability occurring in
the database layer of an application.
• The vulnerability is present when user input is either
incorrectly filtered for string literal escape
characters embedded in SQL statements or user
input is not strongly typed.
• Cause a false positive query result from the
database and grant you access.
SQL Injection
1. App sends form to user.
2. Attacker submits form with
SQL exploit data.
3. Application builds string
with exploit data.
4. Application sends SQL
query to DB.
5. DB executes query,
including exploit, sends
data back to application.
6. Application returns data to
user.
Web Server
Attacker
DB Server
Firewall
User
Pass ‘ or 1=1--
Form
SQL Injection Attack
Unauthorized Access Attempt:
password = ’ or 1=1 -- ( 'OR''=‘ )
SQL statement becomes:
select count(*) from users where username = ‘user’
and password = ‘’ or 1=1 --
Checks if password is empty OR 1=1, which is
always true, permitting access.
Injecting into SELECT
Most common SQL entry point.
SELECT columns
FROM table
WHERE expression
ORDER BY expression
Places where user input is inserted:
WHERE expression
ORDER BY expression
Table or column names
Injecting into INSERT
Creates a new data row in a table.
INSERT INTO table (col1, col2, ...)
VALUES (val1, val2, ...)
Requirements
Number of values must match # columns.
Types of values must match column types.
Technique: add values until no error.
foo’)--
foo’, 1)--
foo’, 1, 1)--
Injecting into UPDATE
Modifies one or more rows of data.
UPDATE table
SET col1=val1, col2=val2, ...
WHERE expression
Places where input is inserted
SET clause
WHERE clause
Be careful with WHERE clause
’ OR 1=1 will change all rows
Example (1)
• User ID: ` OR ``=`
• Password: `OR ``=`
• In this case the sqlString used to create the
result set would be as follows:
select USERID from USER where USERID = ``OR``=``and PWD = ``
OR``=`` TRUE
TRUE
• Which would certainly set the
userHasBeenAuthenticated variable to true.
Example (2)
User ID: ` OR ``=`` --
Password: abc
As anything after the -- will be ignore, the injection
will work even without any specific injection into
the password predicate.
Example (3)
User ID: ` ; DROP TABLE USER ; --
Password: `OR ``=`
select USERID from USER where USERID = `` ; DROP
TABLE USER ; -- ` and PWD = ``OR ``=``
I will not try to get any information, I just want to bring
the application down.
Impact of SQL Injection
1. Leakage of sensitive
information.
2. Reputation decline.
3. Modification of sensitive
information.
4. Loss of control of db
server.
5. Data loss.
6. Denial of service.
Mitigating SQL Injection
Ineffective Mitigations
Blacklists
Partially Effective Mitigations
Whitelists
Blacklists
Filter out or Sanitize known bad SQL
meta-characters, such as single
quotes.
o Though it's easy to point out some
dangerous characters, it's harder to point
all of them.
Whitelist
Reject input that doesn’t match your
list of safe characters to accept.
o Identify what is good, not what is bad.
o Still have to deal with single quotes when
required, such as in names.
Defending against SQL Injection
• URL based injection:
o Avoid using clear text when coding in SQL.
• If your database and webpage are constructed in a
way where you can view the data, it’s open to
injection.
o http://mysite.com/listauthordetails.aspx?SSN=172-
32-9999
o As in prior example, you could add a drop, or other
command, to alter the database.
o Passwords, and other sensitive information need to be
either encrypted or one way hashed. There is no full proof
way to defend from injection, but by limiting sensitive
information, you can insure that your information is at least
somewhat protected.
Defending Against Injection ctd.
• Login based injection:
o Restrict input field length. Instead of allowing an
unlimited amount of characters to be entered for
user name and password, restricting them will
make it more difficult for someone to run a
malicious query.
• User privileges:
o Have a “Superuser/Admin” with full rights, but
limit other users to only the things they need to
do. This way, if someone accesses the database,
they’ll have a restricted amount of privileges.
Defending Against Injection ctd.
• Use proper escapes strings, generally created
through PHP.
o $SQL = "SELECT * FROM users where username =
"mysql_real_escape_string($POST['user']);
• When someone tries to access the database
using a command like OR 1’”;, their query
would return ’ OR 1’, because your query
was created to have a defined escape string.
Defending Against Injection ctd.
• Firewalls and similar intrusion detection
mechanisms provide little defense
against full-scale web attacks.
SQL injection Conclusion
o SQL injection is technique for exploiting
applications that use relational databases
as their back end.
o Transform the innocent SQL calls to a
malicious call
o Cause unauthorized access, deletion of
data, or theft of information
o All databases can be a target of SQL
injection and all are vulnerable to this
technique.
What we learned

More Related Content

What's hot

DNS hijacking using cloud providers – No verification needed
DNS hijacking using cloud providers – No verification neededDNS hijacking using cloud providers – No verification needed
DNS hijacking using cloud providers – No verification neededFrans Rosén
 
Footprinting and reconnaissance
Footprinting and reconnaissanceFootprinting and reconnaissance
Footprinting and reconnaissanceNishaYadav177
 
Investigating Using the Dark Web
Investigating Using the Dark WebInvestigating Using the Dark Web
Investigating Using the Dark WebCase IQ
 
Windows Threat Hunting
Windows Threat HuntingWindows Threat Hunting
Windows Threat HuntingGIBIN JOHN
 
Google Dorking Tutorial | What Is Google Dorks And How To Use It? | Ethical H...
Google Dorking Tutorial | What Is Google Dorks And How To Use It? | Ethical H...Google Dorking Tutorial | What Is Google Dorks And How To Use It? | Ethical H...
Google Dorking Tutorial | What Is Google Dorks And How To Use It? | Ethical H...Simplilearn
 
Open source intelligence
Open source intelligenceOpen source intelligence
Open source intelligencebalakumaran779
 
Ekoparty 2017 - The Bug Hunter's Methodology
Ekoparty 2017 - The Bug Hunter's MethodologyEkoparty 2017 - The Bug Hunter's Methodology
Ekoparty 2017 - The Bug Hunter's Methodologybugcrowd
 
Frontera-Open Source Large Scale Web Crawling Framework
Frontera-Open Source Large Scale Web Crawling FrameworkFrontera-Open Source Large Scale Web Crawling Framework
Frontera-Open Source Large Scale Web Crawling Frameworksixtyone
 
Attacking thru HTTP Host header
Attacking thru HTTP Host headerAttacking thru HTTP Host header
Attacking thru HTTP Host headerSergey Belov
 
Introduction to Malware Analysis
Introduction to Malware AnalysisIntroduction to Malware Analysis
Introduction to Malware AnalysisAndrew McNicol
 
Hunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows EnvironmentHunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows EnvironmentTeymur Kheirkhabarov
 
Tools for Open Source Intelligence (OSINT)
Tools for Open Source Intelligence (OSINT)Tools for Open Source Intelligence (OSINT)
Tools for Open Source Intelligence (OSINT)Sudhanshu Chauhan
 
Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemRoss Wolf
 
FreeIPA - Attacking the Active Directory of Linux
FreeIPA - Attacking the Active Directory of LinuxFreeIPA - Attacking the Active Directory of Linux
FreeIPA - Attacking the Active Directory of LinuxJulian Catrambone
 
OWASP Top 10 2021 Presentation (Jul 2022)
OWASP Top 10 2021 Presentation (Jul 2022)OWASP Top 10 2021 Presentation (Jul 2022)
OWASP Top 10 2021 Presentation (Jul 2022)TzahiArabov
 

What's hot (20)

DNS hijacking using cloud providers – No verification needed
DNS hijacking using cloud providers – No verification neededDNS hijacking using cloud providers – No verification needed
DNS hijacking using cloud providers – No verification needed
 
Footprinting and reconnaissance
Footprinting and reconnaissanceFootprinting and reconnaissance
Footprinting and reconnaissance
 
Deep web
Deep webDeep web
Deep web
 
Investigating Using the Dark Web
Investigating Using the Dark WebInvestigating Using the Dark Web
Investigating Using the Dark Web
 
Guide to dark web
Guide to dark webGuide to dark web
Guide to dark web
 
Windows Threat Hunting
Windows Threat HuntingWindows Threat Hunting
Windows Threat Hunting
 
Google Dorking Tutorial | What Is Google Dorks And How To Use It? | Ethical H...
Google Dorking Tutorial | What Is Google Dorks And How To Use It? | Ethical H...Google Dorking Tutorial | What Is Google Dorks And How To Use It? | Ethical H...
Google Dorking Tutorial | What Is Google Dorks And How To Use It? | Ethical H...
 
Research in the deep web
Research in the deep webResearch in the deep web
Research in the deep web
 
Open source intelligence
Open source intelligenceOpen source intelligence
Open source intelligence
 
Ekoparty 2017 - The Bug Hunter's Methodology
Ekoparty 2017 - The Bug Hunter's MethodologyEkoparty 2017 - The Bug Hunter's Methodology
Ekoparty 2017 - The Bug Hunter's Methodology
 
Offensive OSINT
Offensive OSINTOffensive OSINT
Offensive OSINT
 
Dark web
Dark webDark web
Dark web
 
Frontera-Open Source Large Scale Web Crawling Framework
Frontera-Open Source Large Scale Web Crawling FrameworkFrontera-Open Source Large Scale Web Crawling Framework
Frontera-Open Source Large Scale Web Crawling Framework
 
Attacking thru HTTP Host header
Attacking thru HTTP Host headerAttacking thru HTTP Host header
Attacking thru HTTP Host header
 
Introduction to Malware Analysis
Introduction to Malware AnalysisIntroduction to Malware Analysis
Introduction to Malware Analysis
 
Hunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows EnvironmentHunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows Environment
 
Tools for Open Source Intelligence (OSINT)
Tools for Open Source Intelligence (OSINT)Tools for Open Source Intelligence (OSINT)
Tools for Open Source Intelligence (OSINT)
 
Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find Them
 
FreeIPA - Attacking the Active Directory of Linux
FreeIPA - Attacking the Active Directory of LinuxFreeIPA - Attacking the Active Directory of Linux
FreeIPA - Attacking the Active Directory of Linux
 
OWASP Top 10 2021 Presentation (Jul 2022)
OWASP Top 10 2021 Presentation (Jul 2022)OWASP Top 10 2021 Presentation (Jul 2022)
OWASP Top 10 2021 Presentation (Jul 2022)
 

Viewers also liked

Composición básica de dorks
Composición básica de dorksComposición básica de dorks
Composición básica de dorksTensor
 
Hacking in shadows By - Raghav Bisht
Hacking in shadows By - Raghav BishtHacking in shadows By - Raghav Bisht
Hacking in shadows By - Raghav BishtRaghav Bisht
 
Complete Guide to Seo Footprints
Complete Guide to Seo FootprintsComplete Guide to Seo Footprints
Complete Guide to Seo FootprintsPritesh Das
 
password (facebook)
password (facebook) password (facebook)
password (facebook) Mr. FM
 
File inclusion attack(nop thay)
File inclusion attack(nop thay)File inclusion attack(nop thay)
File inclusion attack(nop thay)phanleson
 
Web-servers & Application Hacking
Web-servers & Application HackingWeb-servers & Application Hacking
Web-servers & Application HackingRaghav Bisht
 
Assistive technology
Assistive technologyAssistive technology
Assistive technologyk4yl4hamilton
 
тестирование защищенности веб приложений
тестирование защищенности веб приложенийтестирование защищенности веб приложений
тестирование защищенности веб приложенийZestranec
 
Black Hat 2011 - Pulp Google Hacking: The Next Generation Search Engine Hacki...
Black Hat 2011 - Pulp Google Hacking: The Next Generation Search Engine Hacki...Black Hat 2011 - Pulp Google Hacking: The Next Generation Search Engine Hacki...
Black Hat 2011 - Pulp Google Hacking: The Next Generation Search Engine Hacki...Rob Ragan
 
SQL Injection in PHP
SQL Injection in PHPSQL Injection in PHP
SQL Injection in PHPDave Ross
 
Sql Injection Tutorial!
Sql Injection Tutorial!Sql Injection Tutorial!
Sql Injection Tutorial!ralphmigcute
 
Neutralizing SQL Injection in PostgreSQL
Neutralizing SQL Injection in PostgreSQLNeutralizing SQL Injection in PostgreSQL
Neutralizing SQL Injection in PostgreSQLJuliano Atanazio
 
SQL Injection - The Unknown Story
SQL Injection - The Unknown StorySQL Injection - The Unknown Story
SQL Injection - The Unknown StoryImperva
 

Viewers also liked (20)

Composición básica de dorks
Composición básica de dorksComposición básica de dorks
Composición básica de dorks
 
Hacking in shadows By - Raghav Bisht
Hacking in shadows By - Raghav BishtHacking in shadows By - Raghav Bisht
Hacking in shadows By - Raghav Bisht
 
Complete Guide to Seo Footprints
Complete Guide to Seo FootprintsComplete Guide to Seo Footprints
Complete Guide to Seo Footprints
 
password (facebook)
password (facebook) password (facebook)
password (facebook)
 
File inclusion attack(nop thay)
File inclusion attack(nop thay)File inclusion attack(nop thay)
File inclusion attack(nop thay)
 
Footprints
FootprintsFootprints
Footprints
 
Web-servers & Application Hacking
Web-servers & Application HackingWeb-servers & Application Hacking
Web-servers & Application Hacking
 
Assistive technology
Assistive technologyAssistive technology
Assistive technology
 
Php
PhpPhp
Php
 
Havij dork
Havij dorkHavij dork
Havij dork
 
Sql full tutorial
Sql full tutorialSql full tutorial
Sql full tutorial
 
Resume Joe Johnston
Resume Joe JohnstonResume Joe Johnston
Resume Joe Johnston
 
Malto Schools
Malto SchoolsMalto Schools
Malto Schools
 
тестирование защищенности веб приложений
тестирование защищенности веб приложенийтестирование защищенности веб приложений
тестирование защищенности веб приложений
 
Black Hat 2011 - Pulp Google Hacking: The Next Generation Search Engine Hacki...
Black Hat 2011 - Pulp Google Hacking: The Next Generation Search Engine Hacki...Black Hat 2011 - Pulp Google Hacking: The Next Generation Search Engine Hacki...
Black Hat 2011 - Pulp Google Hacking: The Next Generation Search Engine Hacki...
 
SQL Injection in PHP
SQL Injection in PHPSQL Injection in PHP
SQL Injection in PHP
 
Sql Injection Tutorial!
Sql Injection Tutorial!Sql Injection Tutorial!
Sql Injection Tutorial!
 
Neutralizing SQL Injection in PostgreSQL
Neutralizing SQL Injection in PostgreSQLNeutralizing SQL Injection in PostgreSQL
Neutralizing SQL Injection in PostgreSQL
 
SQL Injection - The Unknown Story
SQL Injection - The Unknown StorySQL Injection - The Unknown Story
SQL Injection - The Unknown Story
 
Google Hack
Google HackGoogle Hack
Google Hack
 

Similar to Google Dorks and SQL Injection

Hack your db before the hackers do
Hack your db before the hackers doHack your db before the hackers do
Hack your db before the hackers dofangjiafu
 
Code injection and green sql
Code injection and green sqlCode injection and green sql
Code injection and green sqlKaustav Sengupta
 
[Kerference] Nefarious SQL - 김동호(KERT)
[Kerference] Nefarious SQL - 김동호(KERT)[Kerference] Nefarious SQL - 김동호(KERT)
[Kerference] Nefarious SQL - 김동호(KERT)NAVER D2
 
Sql injection attacks
Sql injection attacksSql injection attacks
Sql injection attacksNitish Kumar
 
Unique Features of SQL Injection in PHP Assignment
Unique Features of SQL Injection in PHP AssignmentUnique Features of SQL Injection in PHP Assignment
Unique Features of SQL Injection in PHP AssignmentLesa Cote
 
Sql injection attacks
Sql injection attacksSql injection attacks
Sql injection attacksKumar
 
SQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint PresentationSQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint PresentationRapid Purple
 
SQL INJECTION
SQL INJECTIONSQL INJECTION
SQL INJECTIONAnoop T
 

Similar to Google Dorks and SQL Injection (20)

Hack your db before the hackers do
Hack your db before the hackers doHack your db before the hackers do
Hack your db before the hackers do
 
Code injection
Code injectionCode injection
Code injection
 
Greensql2007
Greensql2007Greensql2007
Greensql2007
 
Code injection and green sql
Code injection and green sqlCode injection and green sql
Code injection and green sql
 
[Kerference] Nefarious SQL - 김동호(KERT)
[Kerference] Nefarious SQL - 김동호(KERT)[Kerference] Nefarious SQL - 김동호(KERT)
[Kerference] Nefarious SQL - 김동호(KERT)
 
SQL Injection in JAVA
SQL Injection in JAVASQL Injection in JAVA
SQL Injection in JAVA
 
Sql injection attacks
Sql injection attacksSql injection attacks
Sql injection attacks
 
SQL INJECTION
SQL INJECTIONSQL INJECTION
SQL INJECTION
 
Sql injection attacks
Sql injection attacksSql injection attacks
Sql injection attacks
 
Unique Features of SQL Injection in PHP Assignment
Unique Features of SQL Injection in PHP AssignmentUnique Features of SQL Injection in PHP Assignment
Unique Features of SQL Injection in PHP Assignment
 
Sql injection attacks
Sql injection attacksSql injection attacks
Sql injection attacks
 
SQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint PresentationSQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint Presentation
 
Web application security
Web application securityWeb application security
Web application security
 
Owasp Top 10
Owasp Top 10Owasp Top 10
Owasp Top 10
 
SQL INJECTION
SQL INJECTIONSQL INJECTION
SQL INJECTION
 
Sql injection
Sql injectionSql injection
Sql injection
 
SQL Injection Attacks
SQL Injection AttacksSQL Injection Attacks
SQL Injection Attacks
 
SQL Injection - Newsletter
SQL Injection - NewsletterSQL Injection - Newsletter
SQL Injection - Newsletter
 
Sq li
Sq liSq li
Sq li
 
Sql injection
Sql injectionSql injection
Sql injection
 

Recently uploaded

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Recently uploaded (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Google Dorks and SQL Injection

  • 1. Google Dorks How much you are secure?
  • 2. In this Lecture • Google Dorks • Types of Google Dorks • SQL injection • Types of SQL injection • Defending against SQL injection
  • 3. Google Dorks • Google Dorks are nothing but simple search operators that are used to refine our search. • A Google dork is an employee who unknowingly exposes sensitive corporate information on the Internet.
  • 4. Google Hacking What is Google hacking? • Google hacking involves using advanced operators in the google search engine to locate the specific string of text with in search result. • Google hacking doesn’t mean that we are going to hack into the google website, it means we use operators provided by google to narrow the search results and to get the specific result as we want. • Generally we call these operators as google dorks . We use these dorks with the string that we want to search.
  • 5. Google hacks • Access Secure Webpages • Download E-books , Videos , Music and movies for free • Access Security Cameras
  • 6. Google Dorks • We have lot of dorks which we will discuss in this lecture one by one. • site • inurl • intitle • allintitle • allinurl • filetype or ext • allintext • intext
  • 7. Site • site dork restricts the results to the specified domain. We can use this dork to find all the pages and subdomains of the specified domain. Example: site:yahoo.com
  • 8. inurl • inurl dork restricts the results to site whose URL contains all the specified phrase or word or string. Example: inurl:admin
  • 9. allinurl • allinurl is same as inurl but with some difference. It restricts results to sites whose URL contains all the specified phrases, but inurl can show sites which contain only single word from the phrase. Example: allinurl: admin login
  • 10. intitle • intitle restricts results to documents whose title contains the specified phrase or word or string. Example: intitle:engineering
  • 11. allintitle • allintitle is almost same as intitle with little difference. it will restricts results to document whose title containing all the specified phrases or collection or word. Example: allintitle:engineering books
  • 13. filetype or ext • It will show all the site which contain document of the specified type. Example: filetype:pdf or ext:pdf
  • 14. intext • it will show all the result pages or sites which contains the specified text or phrase in the text of site. Example: intext:hacking
  • 15. allintext • allintext is same as intext but it will show that results which contain all the text specified in the text of the page or site. Example: allintext: software engineering
  • 16. Combining multiple dorks site:gov inurl:adminlogin Accessing unprotected camera inurl:view/index.shtml Vulnerable Files
  • 17. Files Containing Juicy Info Google search: inurl:.com/configuration.php-dist (Finds the configuration files of the PHP Database on the server.) Files Containing Juicy Passwords Google search: filetype:xls “username | password” (This search reveals usernames and/or passwords of the xls documents.)
  • 19. In this Topic o What are injection attacks? o How SQL Injection Works o Exploiting SQL Injection Bugs o Mitigating SQL Injection o Defending Injection Attacks
  • 20. What is SQL Injection? • SQL injection is a code injection technique that exploits a security vulnerability occurring in the database layer of an application. • The vulnerability is present when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not strongly typed. • Cause a false positive query result from the database and grant you access.
  • 21.
  • 22. SQL Injection 1. App sends form to user. 2. Attacker submits form with SQL exploit data. 3. Application builds string with exploit data. 4. Application sends SQL query to DB. 5. DB executes query, including exploit, sends data back to application. 6. Application returns data to user. Web Server Attacker DB Server Firewall User Pass ‘ or 1=1-- Form
  • 23. SQL Injection Attack Unauthorized Access Attempt: password = ’ or 1=1 -- ( 'OR''=‘ ) SQL statement becomes: select count(*) from users where username = ‘user’ and password = ‘’ or 1=1 -- Checks if password is empty OR 1=1, which is always true, permitting access.
  • 24. Injecting into SELECT Most common SQL entry point. SELECT columns FROM table WHERE expression ORDER BY expression Places where user input is inserted: WHERE expression ORDER BY expression Table or column names
  • 25. Injecting into INSERT Creates a new data row in a table. INSERT INTO table (col1, col2, ...) VALUES (val1, val2, ...) Requirements Number of values must match # columns. Types of values must match column types. Technique: add values until no error. foo’)-- foo’, 1)-- foo’, 1, 1)--
  • 26. Injecting into UPDATE Modifies one or more rows of data. UPDATE table SET col1=val1, col2=val2, ... WHERE expression Places where input is inserted SET clause WHERE clause Be careful with WHERE clause ’ OR 1=1 will change all rows
  • 27. Example (1) • User ID: ` OR ``=` • Password: `OR ``=` • In this case the sqlString used to create the result set would be as follows: select USERID from USER where USERID = ``OR``=``and PWD = `` OR``=`` TRUE TRUE • Which would certainly set the userHasBeenAuthenticated variable to true.
  • 28. Example (2) User ID: ` OR ``=`` -- Password: abc As anything after the -- will be ignore, the injection will work even without any specific injection into the password predicate.
  • 29. Example (3) User ID: ` ; DROP TABLE USER ; -- Password: `OR ``=` select USERID from USER where USERID = `` ; DROP TABLE USER ; -- ` and PWD = ``OR ``=`` I will not try to get any information, I just want to bring the application down.
  • 30. Impact of SQL Injection 1. Leakage of sensitive information. 2. Reputation decline. 3. Modification of sensitive information. 4. Loss of control of db server. 5. Data loss. 6. Denial of service.
  • 31. Mitigating SQL Injection Ineffective Mitigations Blacklists Partially Effective Mitigations Whitelists
  • 32. Blacklists Filter out or Sanitize known bad SQL meta-characters, such as single quotes. o Though it's easy to point out some dangerous characters, it's harder to point all of them.
  • 33. Whitelist Reject input that doesn’t match your list of safe characters to accept. o Identify what is good, not what is bad. o Still have to deal with single quotes when required, such as in names.
  • 34. Defending against SQL Injection • URL based injection: o Avoid using clear text when coding in SQL. • If your database and webpage are constructed in a way where you can view the data, it’s open to injection. o http://mysite.com/listauthordetails.aspx?SSN=172- 32-9999 o As in prior example, you could add a drop, or other command, to alter the database. o Passwords, and other sensitive information need to be either encrypted or one way hashed. There is no full proof way to defend from injection, but by limiting sensitive information, you can insure that your information is at least somewhat protected.
  • 35. Defending Against Injection ctd. • Login based injection: o Restrict input field length. Instead of allowing an unlimited amount of characters to be entered for user name and password, restricting them will make it more difficult for someone to run a malicious query. • User privileges: o Have a “Superuser/Admin” with full rights, but limit other users to only the things they need to do. This way, if someone accesses the database, they’ll have a restricted amount of privileges.
  • 36. Defending Against Injection ctd. • Use proper escapes strings, generally created through PHP. o $SQL = "SELECT * FROM users where username = "mysql_real_escape_string($POST['user']); • When someone tries to access the database using a command like OR 1’”;, their query would return ’ OR 1’, because your query was created to have a defined escape string.
  • 37. Defending Against Injection ctd. • Firewalls and similar intrusion detection mechanisms provide little defense against full-scale web attacks.
  • 38. SQL injection Conclusion o SQL injection is technique for exploiting applications that use relational databases as their back end. o Transform the innocent SQL calls to a malicious call o Cause unauthorized access, deletion of data, or theft of information o All databases can be a target of SQL injection and all are vulnerable to this technique.