Is
here
again….
Chema
Alonso
Previously
on
FOCA….
FOCA
0.X
What
kind
of
data
can
be
found?
• Metadata:
– InformaDon
stored
to
give
informaDon
about
the
document.
• For
example:
Creator,
OrganizaDon,
etc..
• Hidden
informaDon:
– InformaDon
internally
stored
by
programs
and
not
editable.
• For
example:
Template
paths,
Printers,
db
structure,
etc…
• Lost
data:
– InformaDon
which
is
in
documents
due
to
human
mistakes
or
negligence,
because
it
was
not
intended
to
be
there.
• For
example:
Links
to
internal
servers,
data
hidden
by
format,
etc…
Metadata
Risks
• “Secret”
relaDonships
– Government
&
companies
– Companies
&
providers
• Piracy
• ReputaDon
• Social
engineering
aSacks
• TargeDng
Malware
2003
–
MS
Word
bytes
Tony
Blair
TargeDng
Malware
TargeDng
Malware
ElecDng
the
entry
point
Social
Engineering
ASack
Anonym0us
case
GPS
informaDon
Lost
Data
FOCA:
File
types
supported
• Office
documents:
– Open
Office
documents.
– MS
Office
documents.
– PDF
Documents.
• XMP.
– EPS
Documents.
– Graphic
documents.
• EXIFF.
• XMP.
– Adobe
Indesign,
SVG,
SVGZ
(NEW)
What
can
be
found?
• Users:
– Shared
Folders.
– Creators.
– ACLS.
– Modifiers
.
• Internal
Servers.
– Users
in
paths.
– NetBIOS
Name.
• C:\Documents
and
secngs\jfoo – Domain
Name.
\myfile
• /home/johnnyf
– IP
Address.
• OperaDng
systems.
• Database
structures.
• Printers.
– Table
names.
– Local
and
remote.
– Colum
names.
• Paths.
• Devices
info.
– Local
and
remote.
– Mobiles.
• Network
info.
– Photo
cameras.
– Shared
Printers.
• Private
Info.
– Personal
data.
• History
of
use.
Demo:
Single
files
Sample:
FBI.gov
Total:
4841
files
Are
they
cleaned?
Metadata
in
Search
Engines
FOCA
1
v.
RC3
• FingerprinDng
OrganizaDons
with
Collected
Archives
– Search
for
documents
in
Google
and
Bing
– AutomaDc
file
downloading
– Capable
of
extracDng
Metadata,
hidden
info
and
lost
data
– Cluster
informaDon
– Analyzes
the
info
to
fingerprint
the
network.
Demo:
A
lot
of
files
How
may
days
to
do
the
pentesDng?
SomeDmes
don´t
hSp://www.sam.usace.army.mil/en/Upload/FTPLink.html
FOCA
2.5
• Network
Discovery
• Recursive
algorithm
• InformaDon
Gathering
• Sw
RecogniDon
• DNS
Cache
Snooping
• ReporDng
Tool
DNS
Search
Panel
FOCA
2.5:
Exalead
Huge
domains
case
DNS
Search
&
Zone
Transfer
• IP
resoluDon
• Well-‐Known
records
– NS
– TXT
(SPF)
– MX
– SOA
(Primary.master)
• Zone
Transfer
• Diccionary
search
Network
Discovery
Algorithm
hSp://apple1.sub.domain.com/~chema/dir/fil.doc
1) hSp
-‐>
Web
server
2) GET
Banner
HTTP
3) domain.com
is
a
domain
4) Search
NS,
MX,
SPF
records
for
domain.com
5) sub.domain.com
is
a
subdomain
6) Search
NS,
MX,
SPF
records
for
sub.domain.com
7) Try
all
the
non
verified
servers
on
all
new
domains
1) server01.domain.com
2) server01.sub.domain.com
8) Apple1.sub.domain.com
is
a
hostname
9) Try
DNS
PredicDon
(apple1)
on
all
domains
10) Try
Google
Sets(apple1)
on
all
domains
Network
Discovery
Algorithm
hSp://apple1.sub.domain.com/~chema/dir/fil.doc
11)
Resolve
IP
Address
12)
Get
CerDficate
in
hSps://IP
13)
Search
for
domain
names
in
it
14)
Get
HTTP
Banner
of
hSp://IP
15)
Use
Bing
Ip:IP
to
find
all
domains
sharing
it
16)
Repeat
for
every
new
domain
17)
Connect
to
the
internal
NS
(1
or
all)
18)
Perform
a
PTR
Scan
searching
for
internal
servers
19)
For
every
new
IP
discovered
try
Bing
IP
recursively
20)
~chema
-‐>
chema
is
probably
a
user
Network
Discovery
Algorithm
hSp://apple1.sub.domain.com/~chema/dir/fil.doc
21)
/
,
/~chema/
and
/~chema/dir/
are
paths
22)
Try
directory
lisDng
in
all
the
paths
23)
Search
for
PUT,
DELETE,
TRACE
methods
in
every
path
24)
Fingerprint
sofware
from
404
error
messages
25)
Fingerprint
sofware
from
applicaDon
error
messages
26)
Try
common
names
on
all
domains
(dicDonary)
27)
Try
Zone
Transfer
on
all
NS
28)
Search
for
any
URL
indexed
by
web
engines
related
to
the
hostname
29)
Download
the
file
30)
Extract
the
metadata,
hidden
info
and
lost
data
31)
Sort
all
this
informaDon
and
present
it
nicely
32)
For
every
new
IP/URL
start
over
again
Demo:
disa.mil
Digital
CerDficates
FOCA
2.5
URL
Analysis
Unsecure
HSp
Methods
Search
&
Upload
Searching
for
Server-‐Side
Technologies
FOCA
2.5
&
Shodan
Demo:
whitehouse.gov
Fuzzing
opDons
(PRO)
.lisDng
DNS
Cache
Snooping
DNS
Cache
Snooping
DNS
Cache
Snooping
• Internal
Sofware
– Windows
Update
– Gtalk
• Evilgrade
– DetecDng
vulnerable
sofware
to
Evilgrade
aSacks
• AV
evassion
– DetecDng
internal
AV
systems
• Malware
driven
by
URL
– Hacking
a
web
site
ussually
visited
by
internal
users
FOCA
ReporDng
Module
(PRO)
Demo:
DNS
Cache
Snooping
Fear
The
FOCA
FOCA
on
Linux?
FOCA
Online
hSp://www.informaDca64.com/FOCA
Cleaning
documents
• OOMetaExtractor
hSp://www.codeplex.org/oometaextractor
IIS
MetaShield
Protector
hSp://www.metashieldprotector.com
Get
FOCA!
• FOCA
Free
2.6.1
– hSp://www.informaDca64.com/FOCA
• Love
FOCA
and
want
the
Pro
Version?
– Book
for
an
online
training!
(28th
April)
– hSp://www.informaDca64.com/DownloadFOCA/
Trainings.aspx
• Have
the
Pro
version
but
not
the
last
version?
– Help
FOCA
• Spread
the
word!
• Buy
a
FOCA
T-‐Shirt
• Buy
me
something
to
drink
Buy
a
FOCA
T-‐Shirt
And
be
«Sexy»
}:))
QuesDons?
-‐ Chema
Alonso
-‐
[email protected]
-‐ hSp://www.informaDca64.com
-‐ hSp://www.elladodelmal.com
-‐ hSp://twiSer.com/chemaalonso
-‐ hSp://www.forefront-‐es.com
-‐ hSp://www.seguridadapple.com
-‐ hSp://www.windowstecnico.com
-‐ hSp://www.puntocomparDdo.com
-‐ Working
on
FOCA:
-‐ Chema
Alonso
-‐ Alejandro
Marvn
-‐ Francisco
Oca
-‐ Manuel
Fernández
«The
Sur»
-‐ Daniel
Romero
-‐ Enrique
Rando
-‐ Pedro
Laguna
-‐ Special
Thanks
to:
John
Matherly
[Shodan]