Cansecwest - The Death of AV defence in depth

Thierry Zoller
Thierry ZollerInformation Security and Privacy Risk Manager
The Death of AV Defense in Depth ?
- revisiting Anti-Virus Software
Sergio Alvarez – Director of Research
Thierry Zoller – Security Engineer
 Sergio Alvarez
> Director of Research @ n.runs AG
> Argentine
> Lives in Berlin since 2005
 Thierry Zoller
> Security Engineer @ n.runs AG
> Author of BTCrack, Secure-it, Harden-it
> Luxembourg
Revisiting AV Software ? > Who are we ?
Who are we ?
 Attacking the Parsing Engines to Own the AV Software
> Sergio Alvarez
 Attacking the Parsing Engines to ByPass Detection
> Thierry Zoller (For reasons beyond his control couldn’t be here today)
Revisiting AV Software ?
What will we talk about ?
Common Problems (Software, Vendor Notification)
1 Introduction – AV DiD – AV Problems related to Email
2
Introduction – AV DiD
3 Hunting Bugs
Death of AV Defense in Depth ? > TOC
4 The Result and Demos
 This talk is NOT about the Death of
DiD as a concept.
 This talk is about
> questioning real-life implementations of DiD,
specifically as implemented for Anti-Virus
solutions and Email Security (“AV DiD”)
> showing the threat is real (Demos)
> discovering new bugs =)
Death of AV Defense in Depth ? > Introduction
Introduction
 Defense in Depth (DiD) originally is a concept as used by ancient
Military. Main Goal : Get more time
 In General “The paradigm describes an approach where you assume that individual
(even multiple) elements of your defense fall, in the worst possible way “
Death of AV Defense in Depth ? > Military
The Roots of „Defense In Depth“
Death of AV Defense in Depth ? > IT Security
 IT Security DiD is about reducing the attack surface
 IT Security DiD is about having multiple redundant security measures
 AV DiD is generally being defined and promoted according to this logic (and best
practices) :
 The Problem : You think you have implemented DiD when in reality you have not , you
just created a much bigger problem. Let us explain.
Transposing DiD to AV and IT Security in General
Corporate User
Corporate Mail ServerMail Gateway
* Vendor names were chosen randomly
 Recap : In General “The paradigm describes an approach where you assume that individual
(even multiple) elements of your defense fall, in the worst possible way “
 Where is the Problem ?
Current AV DiD implementations define “the worst possible way” an Anti-virus product may fail
as “Fails to detect a threat” or “Fails to detect a virus” whereas in reality the worst possible way is a
more severe one: Compromise of the underlying OS through the Anti-Virus Engine.
 The result is that AV software itself is left with no protection at all, there is rarely
any kind of mitigation.
 Side-Note : “Worst possible Failure” in general for Security Software (IPS, IDS, AV..)is defined as
“fails to detect/react/alert”. Attacks on the Defenses themselves are rarely taken into account.
 This has led the industry to deploy AV DiD in a way that is detrimental to the concept
> Multiple AV engines running on critical Servers with high privileged rights
> AV Engines everywhere, high privileges, unprotected.
> Mail gateways
> Servers (WWW, DB, Fileserver..)
> Clients
> …
[1] “Anti-Virus Defense in Depth” - Microsoft
Death of AV Defense in Depth ? > Problem
Where is the Problem ?
Anti-Virus Software > Anti-Virus Software is everywhere
So where is the problem ?
Anti-Virus Software > Anti-Virus Software is everywhere
So where is the problem ?
AV
AV
AV
AV
AV AV AV AV
AV
AV
AV
AV
 Antivirus Security Myths :
> Antivirus Software is secure
> Makes our network and systems more secure
 Antivirus Developers Myths :
> AV Software is developed by security experts
 Antivirus Detection Myths :
> I use Antivirus Software, I will not get infected
> My Antivirus Software detects even unknown viruses
Anti-Virus Software > Myths
Why bother ? AV Software is secure by design…
 Antivirus Security Facts :
> HUGE Attack surface
> Parse thousands of formats (Kaspersky claims over 3000)
> Programmed in unmanaged languages (Performance)
> It takes time and resources to re-create the AV engines from scratch
In managed languages (read: bugs will stay here for a while)
> The result : Antivirus have to deal with so many file formats that chances are good there is
more than one security flaw
 Antivirus History
> First developed to protect against Boot Sector and Viruses
> Infection Vector : Disc
> Overhauled to protect against Worms
> Infection Vector : Network
> Overhauled yet again to work on Servers/Gateways
> Code ported, Logic not adapted (see Bypass)
Anti-Virus Software > Facts
Here are the facts
• Code reused – 15 years
• Logic not adapted to new
vectors
• Vulnerabilities ported over
 It gets even worse :
> More parsing code as AV software mutates to an
All-in-one Solution
> They now start coming with IDS/IPS functions
> The more engines are involved, more potential bugs
are involved, you are unknowingly increasing the
attack surface by following best practices.
 A small sample from these widely supported formats (includes variants)
> Zip, Zip SFX, ARJ, ARJ, SFX, TAR, GZ, ZOO, UUEncode, TNEF, MIME, BINHEX,
MSCompress, CAB, CAB SFX, LZH, LZH SFX, LHA, RAR, RAR SFX, JAR, BZ2,
Base64, Mac Binary, ASPack, CHM, DOC, EML, EXE, FSG, HLP,PDF, Yoda, ELF,
PPT, OPD, and many more.
> If the creators of these file types themselves have problems parsing them, what are the
chances for the antivirus to get them all right? (scary, isn't it?)
Anti-Virus Software > Facts
Here are the Facts
 Want to try it yourself? :
> Open your favourite AV in IDA Pro (4.9 is free)
> ALT+t and search for ‘RAR’
> Double click and check what file formats it supports.
 The following is a RAW output from a random AV solution:
> 7z, zip, exe, arj, tar, gz, bz, ace, tgz, uue, xxe, lzh, lha, ice, com, zoo, dat, ??_, cab, rar, jar, 386, ?
HT*, ACM, ADE, ADP, ANI, APP, ASD, ASF, ASP, ASX, AWX, AX, BAS, BAT, BIN, BOO, CDF, CHM,
CLASS, CMD, CNV, CPL, CRT, CSH, DLL, DLO, DO?, DOC, DRV, EMF, EML, FLT, FOT, HLP, HT*,
INF, INI, INS, ISP, J2K, JFF, JFI, JFIF, JIF, JMH, JNG, JP2, JPE, JPEG, JPG, JS*, JSE, LNK, MD?,
MDB, MOD, MS?, NWS, OBJ, OCX, OLB, OSD, OV?, PCD, PDF, PDR, PGM, PHP, PIF, PKG, PL*,
PNG, POT, PPS, PPT, PRG, REG, RPL, RTF, SBF, SCR, SCRIPT, SCT, SH, SIS, SHA, SHB, SHS,
SHTM*, SPL, SWF, SYS, TLB, TMP, TSP, TTF, URL, VB?, VCS, VLM, VXD, VXO, WIZ, WLL, WMD,
WMF, WMS, WMZ, WPC, WSC, WSF, WSH, WWK, XL?, XML
Anti-Virus Software > Facts
Here are the Facts
.rdata:601EA638 String2 db '.rar',0 ; DATAXREF: sub_601CE320+165o
…
.rdata:601EA65C ; char aSfx[]
.rdata:601EA65C aSfx db 'sfx',0 ; DATAXREF: sub_601CF6E0+88o
.rdata:601EA660 ; char aExe[]
.rdata:601EA660 aExe db 'exe',0 ; DATAXREF: sub_601CF6E0+6Do
…
etc
Antivirus Software is a must have
Anti-Virus Software > Facts
Here are the Facts
Common Problems (Software, Vendor Notification)2
Introduction – AV DiD1
Common Problems (Software, Vendor Notification)
3 Hunting Bugs
Death of Defense in Depth ? > TOC
4 The Result and Demos
 Communication Protocols Security by Obscurity
> Hard coded passwords in the binaries
 Improper Password Handling
> Storing the password of the administration console in the client's configuration file,
too. (TrendMicro did this some time ago, 'encrypted' with a char depending on
position mutation algorithm.)
 Client Listeners Standard Security Issues
 NULL DACLs
> Registry for Settings
> Configuration Files
> Handles
Anti-Virus Software > General problems
Common Problems
Anti-Virus Software > General problems
 We report every bug to the vendor before publishing *any* Information
> It’s difficult !
> Even finding the correct person to talk to
> secure@ / security@ - do not always exist
> Bugs are more often than not fixed quietly
> 10 Bugs reported transformed in 1 Bug
being published (“Fixed Archive bypass”)
> For Bypasses - Risk Rating is often a joke
> Don’t make the difference between Client
and Gateway Solutions
> We spent days explaining bugs :
> “It just crashes because it jump invalid memory
location, EIP points to x41414141, that
address does not exist, it’s not a security Problem…”
> Hey, but that exceptions is handled !
Anti-Virus Software > General problems
Vulnerability Notification
Anti-Virus Software > General problems
Vendor Responses
Anti-Virus Software > General problems
Vendor Responses
Anti-Virus Software > General problems
Vendor Responses
The Problem is Winrar & Winzip can extract that file – this makes it a security
problem if this file is reported as clean.
Who here in this Room uses Winrar or Winzip ?
Anti-Virus Software > General problems
Vendor Responses
Anti-Virus Software > General problems
Vendor Responses
Common Problems (Software, Vendor Notification)
3
Introduction – AV DiD1
2
Hunting Bugs
Death of Defense in Depth ? > TOC
4 The Result and Demo
Hunting Bugs
 AV Bypass / Evasion
 Problem widely known since 2005, nearly no vendor reacted to early reports
Wakeup call 3 months after revealed nearly none of them had patched the bypasses
 What is AV Evasion ?
> Key concept : AV engine cannot extract an archive, but the user can
> Why is this important ?
> Sneaking malicious code through gateways, hiding content in general, infected files on fileservers etc.
> Typical arguments from AVvendors :
> Argument 1 We will catch the malicious code at run-time (on-access) so bypasses are no threats.
> Problem: Your Gateway/Server Solutions do NOT execute the code, so there is NO on-access scan as
there is no access/execution. As such the engine cannot scan the files inside and will generally flag the
file as clean (Consequences might be: Mail is sent further and marked as clean, file is downloaded etc.)
> This is also a problem for AV clients if they are run in an environment where files are not executed
(Fileservers, Mails, Web servers, Online Mail services etc.)
> Argument 2 “It’s the same than adding a Password to a Zip file, we can’t scan these either”
This is why companies often choose to have GW Policies to generally forbid encrypted files (and have
them allowed for specific addresses upon request), for the simple reason that they cannot be scanned.
Furthermore for these encrypted files, AV engines in general add a Banner/Title to indicate the file was
not scanned “File not scanned” indicating that it should be treated as such, this warning does not show
for bypasses.
Anti-Virus Software > Hunting Bugs
Anti-Virus Bypass
 Bypasses: F-Secure as of to-date is the only AV vendor we are
aware of that estimates the risk in the advisories according to where
and how the product is used
> Low Risk for Client Software
> High Risk for Gateway Products
 Message to AV companies :
Your goal is to detect malicious code, do not flag supported
archive formats as clean if you error on parsing them.
(Flag supported archive formats as unscanned/suspicious,
because the engine wasn’t able to scan the content)
Anti-Virus Software > Hunting Bugs
Anti-Virus Bypass
 Example of a bypass
 Version_needed_to_extract Field (ZIP)
> Extracts without errors in Winrar (i.e. the user will execute whatever is inside)
Anti-Virus Software > Hunting Bugs
Anti-Virus Bypass
“Vulnerable”
20 AV Vendors
 Example of a bypass
 Adding a EXE header (MZ) to a RAR file
> Winrar extracts file without Errors
Anti-Virus Software > Hunting Bugs
Anti-Virus Bypass
Addendum 11/2007:
TZO: It has come to my attention that this
bug was a re-discovery, In OCT 2005
somebody by the nickname of fRoGGz found
this issue and published the results: CVE |
BID .
This also means that what you see is a list of
vendors might not have reacted since 2005
or have introduced the same bug.
“Vulnerable”
16 AV Vendors
 Attack Vectors Testing
> Entry Points Runtime Analysis
> Wireshark
> Cdb
> OllyDbg
> Dum(b)ug
> PaiMei (win32)
> vtrace (multiplatform debugging framework)
> Sysinernals tools, etc
> Parsers Analysis (idem above – Wireshark + IDA)
> Fuzzing
> Peach, Sulley, custom scripts, etc.
Anti-Virus Software > Hunting Bugs
Hunting Bugs
 Fuzzing Techniques (Generators + Publishers + Debug APIs)
> Fuzzing Engine
> Customizable structures to represent the datatypes
> Supports structure recursions (embedded structures)
> Add customized structures on the fly (responses based)
> Function Call Interception (script on top of vtrace)
> Argument/Return value manipulation in runtime
> Allows to fuzz virtually (almost) anything
> Runtime tracing (customised scripts on top of vtrace)
> Automated Tracing
> Function Call Hijacking
> Multiplatform (Windows, Linux, MacOSX)
> Easy to extend
Anti-Virus Software > Hunting Bugs
Hunting Bugs
Anti-Virus Software > Hunting Bugs
Hunting Bugs
A . L o c a l f i l e h e a d e r :
lo c a l file h e a d e r s ig n a tu r e 4 b y te s ( 0 x 0 4 0 3 4 b 5 0 )
v e r s io n n e e d e d t o e x t r a c t 2 b y te s
g e n e r a l p u r p o s e b it fla g 2 b y te s
c o m p r e s s io n m e t h o d 2 b y te s
la s t m o d fi le tim e 2 b y te s
la s t m o d file d a te 2 b y te s
c r c - 3 2 4 b y te s
c o m p r e s s e d s i z e 4 b y te s
u n c o m p r e s s e d s i z e 4 b y te s
f i l e n a m e l e n g t h 2 b y te s
e x t r a f i e l d l e n g th 2 b y te s
f i l e n a m e ( v a r ia b le s iz e )
e x t r a f i e l d ( v a r ia b le s iz e )
B . D a t a d e s c r i p t o r :
c r c - 3 2 4 b y te s
c o m p r e s s e d s i z e 4 b y te s
u n c o m p r e s s e d s i z e 4 b y te s
C . C e n t r a l d i r e c t o r y s tr u c t u r e :
c e n tr a l file h e a d e r s ig n a tu r e 4 b y te s ( 0 x 0 2 0 1 4 b 5 0 )
v e r s io n m a d e b y 2 b y te s
v e r s io n n e e d e d t o e x t r a c t 2 b y te s
g e n e r a l p u r p o s e b it fla g 2 b y te s
c o m p r e s s io n m e t h o d 2 b y te s
la s t m o d file tim e 2 b y te s
la s t m o d file d a te 2 b y te s
c r c - 3 2 4 b y te s
c o m p r e s s e d s i z e 4 b y te s
u n c o m p r e s s e d s i z e 4 b y te s
f i l e n a m e l e n g t h 2 b y te s
e x t r a f i e l d l e n g t h 2 b y te s
f i l e c o m m e n t l e n g t h 2 b y te s
d is k n u m b e r s ta rt 2 b y te s
PKZIP
Principal Targets
- Size/Length fields
- String Fields
Anti-Virus Software > Hunting Bugs
Hunting Bugs
PKZIP
 Some Tips
> Simultaneous fields fuzzing does give very good results
> When a file type has a TLV structure, don’t fuzz only one stage only, it’s
always more effective to use multiple TLV instances.
> Look for Path-Flow Coverage, not for Code Coverage
> When exploiting heap massaging is easily accomplished with embedded
compressed files ;), use it!
> If you want to target multiple engines at once, compress your exploits
together in the same file
> Files names and files other IS IMPORTANT,the engines analyze them in
that same order.
Anti-Virus Software > Hunting Bugs
Hunting Bugs
 Useful links with files specs
> http://www.wotsit.org/
> And Google a lot ;)
> Microsoft files type specs are available at Microsoft website.
Anti-Virus Software > Hunting Bugs
Hunting Bugs
Common Problems (Software, Vendor Notification)
4
Introduction – AV DiD
2
3 Hunting Bugs
Death of Defense in Depth ? > TOC
1
Demos / New Techniques / No Recording <-The Result and Demo
 End up in:
> Unprotected Settings (wrong DACLs)
> Detection Bypass / Evasion
> Low Impact for AV clients, Important for Gateways
> Privilege Escalation
> DoS
> AV dies, Mail service continues
> AV dies, takes OS with it, no more mails
> Blue Screen of Death
> Remote Code Execution
> Complete Network Environment Compromise
Anti-Virus Software > Facts
The Result
Question : Who recognizes this Email service ?
 The Result :
25.07.2007 CA eTrust - Denial of Service Advisory [CHM]
23.07.2007 Norman Antivirus - Denial of Service Advisory [DOC]
23.07.2007 Norman Antivirus - Detection Bypass Advisory [ DOC]
23.07.2007 Norman Antivirus - Arbitrary Code Execution Advisory [LZH]
23.07.2007 Norman Antivirus - Arbitrary Code Execution Advisory [ACE]
20.07.2007 Panda Antivirus - Arbitrary Code Execution [EXE]
20.07.2007 ESET NOD32 - Denial of Service [ASPACK+FSG]
20.07.2007 ESET NOD32 - Denial of Service [ASPACK]
20.07.2007 ESET NOD32 - Arbitrary Code Execution [CAB]
04.06.2007 F-Secure Denial of Service [FSG]
04.06.2007 F-Secure Denial of Service [ARJ]
01.06.2007 F-Secure Remote Code Execution [LZH]
30.05.2007 Avira Antivir Infinite Loop [TAR]
29.05.2007 Avira Antivir Divide By Zero [UPX]
28.05.2007 Avira Antivir Abitrary Remote Code Execution [LZH]
25.05.2007 Avast ! Heap Overflow [SIS]
24.04.2007 Avast! Heap Overflow [CAB]
Anti-Virus Software > Facts
The Result
+100 Vulnerabilities
reported just by Sergio
@40 fixed
@20 didn’t even replay
Over 800 bypasses
some refuse to fix at all..
 Don’t forget : AV Software runs also on your Email Architecture!
> Gateway (MX)
> Corporate Mail Server (Real-time & Scheduled)
> Client
 Why does this change what is at stake?
> Email comes in from the outside
> Email travels through your internal network
> Email goes through your Firewalls
Anti-Virus Software > E-Mail
AV Vulnerabilities as related to Email traffic
Oops, suddenly AV Vulnerabilities seem a lot more dangerous. What if
non-trusted code gets executed on the Corporate Mail Server ?
Anti-Virus Software > Email
AV Vulnerabilities - Increase of Attack Surface
Corporate User
Mail Gateway
Attacker
Internet DMZ
Proxy Server
Trusted Zone
Corporate Mail Server
DNS Server
Multiple AV Engines, different vendors ->Increase of Attack surface
AV software running with privileged rights on critical parts of infrastructure.
Paradox: “The more you protect yourself the more vulnerable you become”
Anti-Virus Software > Email
Exploit Staging - Oversimplified
Corporate User
Mail Gateway
Attacker
Internet DMZ
Proxy Server
Trusted Zone
Corporate Mail Server
DNS Server
Oversimplification :
• Attacker sends an e-mail with a attachment targeting the Symantec Engine
• Avira on the Mail gateway does recognize a threat and the Mail is passed on
• The Attachment hits the Corporate Server where the exploit triggers
• Attacker gets a shell
1
2 3
4
Anti-Virus Software > Hunting Bugs
Demo
Demo
 This is just the top of the iceberg
> IPSs/IDSs deal with +100 protocols
 Paradox
> “The more you protect yourself the more vulnerable you become”
Anti-Virus Software > Final Words
Final Words
 n.runs opened a Pandora's Box
> There is no doubt things will get worse
> Lots of more bugs to come
 Before going public, n.runs looked for
a Solution, there was no easy one, hence :
 n.runs is developing a secure system solution. The core of this solution is based on
innovative architecture and software. The foundation for this development is based
upon the years of consulting experience that n.runs has collected in IT security,
infrastructure and processes.
 At this time the final tests are being performed. The market introduction begins in the
4th quarter of 2007.
Anti-Virus Software > Final Words
Final Words
 The solution developed by n.runs under the code name "ParsingSafe " will build on
and work together with the customer antivirus products that are already in place or
that are planned to be put in place.
 Based on this, the antivirus vendors are very important technology partners for
our solution. The goal of the customer is still primarily to have the highest rate of virus
recognition possible but now embedded in a highly secure architecture that will prevent
successful attacks on the AV products.
 For more information, please contact:
Torsten Pressel,
Director of Software Sales n.runs AG
Tel.: +49 6171 699-576
Email: parsingsafe@nruns.com
Web: http://www.nruns.com/ps
Anti-Virus Software > Final Words
Final Words
Anti-Virus Software > Final Words
Final Words
Thank you for your
Attention
Sergio Alvarez
Sergio.Alvarez@nruns.com
Thierry Zoller
Thierry.Zoller@nruns.com
 Vtrace, http://kenshoto.com/vtrace
 Paimei, http://code.google.com/p/paimei/
 n.bug, http://www.nruns.com/security_tools.php
 Peach Fuzzing Framework, http://peachfuzz.sourceforge.net
 SysInternals Tools, http://www.sysinternals.com
 Dum(b)ug, http://www.phenoelit-us.org/fr/tools.html
 Wireshark, http://www.wireshark.org
 Windows Debugging Tools, http://www.microsoft.com/whdc/devtools/debugging
 IDA Pro, http://www.hex-rays.com/idapro/
 OllyDbg, http://www.ollydbg.de
Anti-Virus Software > Final Words
References
1 of 47

Recommended

Introduction to DevOps and DevOpsSec with Secure Design by Prof.Krerk (Chulal... by
Introduction to DevOps and DevOpsSec with Secure Design by Prof.Krerk (Chulal...Introduction to DevOps and DevOpsSec with Secure Design by Prof.Krerk (Chulal...
Introduction to DevOps and DevOpsSec with Secure Design by Prof.Krerk (Chulal...iotcloudserve_tein
330 views56 slides
Zerovm backgroud by
Zerovm backgroudZerovm backgroud
Zerovm backgroudUT, San Antonio
654 views27 slides
IDA Vulnerabilities and Bug Bounty  by Masaaki Chida by
IDA Vulnerabilities and Bug Bounty  by Masaaki ChidaIDA Vulnerabilities and Bug Bounty  by Masaaki Chida
IDA Vulnerabilities and Bug Bounty  by Masaaki ChidaCODE BLUE
4K views21 slides
BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In... by
BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...
BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...BlueHat Security Conference
1.1K views58 slides
Ceh v5 module 08 denial of service by
Ceh v5 module 08 denial of serviceCeh v5 module 08 denial of service
Ceh v5 module 08 denial of serviceVi Tính Hoàng Nam
2K views70 slides
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteli by
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteliDefcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteliPriyanka Aash
3.5K views58 slides

More Related Content

What's hot

Mc Afee And Georgia State University Taking Aim At Network Intruders With I... by
Mc Afee And Georgia State University   Taking Aim At Network Intruders With I...Mc Afee And Georgia State University   Taking Aim At Network Intruders With I...
Mc Afee And Georgia State University Taking Aim At Network Intruders With I...Tammy Clark
425 views23 slides
Finding the needle in the hardware haystack - HRES (1) by
Finding the needle in the hardware haystack - HRES (1)Finding the needle in the hardware haystack - HRES (1)
Finding the needle in the hardware haystack - HRES (1)Tim Wright
455 views68 slides
BlueHat v17 || Extracting Secrets from Silicon – A New Generation of Bug Hunt... by
BlueHat v17 || Extracting Secrets from Silicon – A New Generation of Bug Hunt...BlueHat v17 || Extracting Secrets from Silicon – A New Generation of Bug Hunt...
BlueHat v17 || Extracting Secrets from Silicon – A New Generation of Bug Hunt...BlueHat Security Conference
1.1K views57 slides
CODE BLUE 2014 : [Keynote] IDA and digital security by Ilfak Guilfanov by
CODE BLUE 2014 : [Keynote] IDA and digital security by Ilfak GuilfanovCODE BLUE 2014 : [Keynote] IDA and digital security by Ilfak Guilfanov
CODE BLUE 2014 : [Keynote] IDA and digital security by Ilfak GuilfanovCODE BLUE
2.7K views45 slides
An Antivirus API for Android Malware Recognition by
An Antivirus API for Android Malware Recognition An Antivirus API for Android Malware Recognition
An Antivirus API for Android Malware Recognition Fraunhofer AISEC
2.3K views24 slides
Native Code Execution Control for Attack Mitigation on Android by
Native Code Execution Control for Attack Mitigation on AndroidNative Code Execution Control for Attack Mitigation on Android
Native Code Execution Control for Attack Mitigation on AndroidFraunhofer AISEC
1.9K views19 slides

What's hot(20)

Mc Afee And Georgia State University Taking Aim At Network Intruders With I... by Tammy Clark
Mc Afee And Georgia State University   Taking Aim At Network Intruders With I...Mc Afee And Georgia State University   Taking Aim At Network Intruders With I...
Mc Afee And Georgia State University Taking Aim At Network Intruders With I...
Tammy Clark425 views
Finding the needle in the hardware haystack - HRES (1) by Tim Wright
Finding the needle in the hardware haystack - HRES (1)Finding the needle in the hardware haystack - HRES (1)
Finding the needle in the hardware haystack - HRES (1)
Tim Wright455 views
BlueHat v17 || Extracting Secrets from Silicon – A New Generation of Bug Hunt... by BlueHat Security Conference
BlueHat v17 || Extracting Secrets from Silicon – A New Generation of Bug Hunt...BlueHat v17 || Extracting Secrets from Silicon – A New Generation of Bug Hunt...
BlueHat v17 || Extracting Secrets from Silicon – A New Generation of Bug Hunt...
CODE BLUE 2014 : [Keynote] IDA and digital security by Ilfak Guilfanov by CODE BLUE
CODE BLUE 2014 : [Keynote] IDA and digital security by Ilfak GuilfanovCODE BLUE 2014 : [Keynote] IDA and digital security by Ilfak Guilfanov
CODE BLUE 2014 : [Keynote] IDA and digital security by Ilfak Guilfanov
CODE BLUE2.7K views
An Antivirus API for Android Malware Recognition by Fraunhofer AISEC
An Antivirus API for Android Malware Recognition An Antivirus API for Android Malware Recognition
An Antivirus API for Android Malware Recognition
Fraunhofer AISEC2.3K views
Native Code Execution Control for Attack Mitigation on Android by Fraunhofer AISEC
Native Code Execution Control for Attack Mitigation on AndroidNative Code Execution Control for Attack Mitigation on Android
Native Code Execution Control for Attack Mitigation on Android
Fraunhofer AISEC1.9K views
Portakal Teknoloji Otc Lyon Part 1 by bora.gungoren
Portakal Teknoloji Otc  Lyon Part 1Portakal Teknoloji Otc  Lyon Part 1
Portakal Teknoloji Otc Lyon Part 1
bora.gungoren546 views
Protecting Your Key Asset – Data Protection Best Practices V2.0 Final by Vinod Kumar
Protecting Your Key Asset – Data Protection Best Practices V2.0   FinalProtecting Your Key Asset – Data Protection Best Practices V2.0   Final
Protecting Your Key Asset – Data Protection Best Practices V2.0 Final
Vinod Kumar466 views
Practical Security Assessments of IoT Devices and Systems by Ollie Whitehouse
Practical Security Assessments of IoT Devices and Systems Practical Security Assessments of IoT Devices and Systems
Practical Security Assessments of IoT Devices and Systems
Ollie Whitehouse3.4K views
Revealing the Attack Operations Targeting Japan by Shusei Tomonaga & Yuu Nak... by CODE BLUE
Revealing the Attack Operations Targeting Japan by  Shusei Tomonaga & Yuu Nak...Revealing the Attack Operations Targeting Japan by  Shusei Tomonaga & Yuu Nak...
Revealing the Attack Operations Targeting Japan by Shusei Tomonaga & Yuu Nak...
CODE BLUE5K views
Windows Service Hardening by Digital Bond
Windows Service HardeningWindows Service Hardening
Windows Service Hardening
Digital Bond3.3K views
RIoT (Raiding Internet of Things) by Jacob Holcomb by Priyanka Aash
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob Holcomb
Priyanka Aash1.1K views
Attacking Embedded Devices (No Axe Required) by Security Weekly
Attacking Embedded Devices (No Axe Required)Attacking Embedded Devices (No Axe Required)
Attacking Embedded Devices (No Axe Required)
Security Weekly3.2K views
Day4 by Jai4uk
Day4Day4
Day4
Jai4uk630 views
BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations by BlueHat Security Conference
BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations
BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations
Confidentiality policies UNIT 2 (CSS) by SURBHI SAROHA
Confidentiality policies UNIT 2 (CSS)Confidentiality policies UNIT 2 (CSS)
Confidentiality policies UNIT 2 (CSS)
SURBHI SAROHA1.4K views
Testingfor Sw Security by ankitmehta21
Testingfor Sw SecurityTestingfor Sw Security
Testingfor Sw Security
ankitmehta21346 views
Pass4sure 640-554 Cisco IOS Network Security by Hecrocro
Pass4sure 640-554 Cisco IOS Network SecurityPass4sure 640-554 Cisco IOS Network Security
Pass4sure 640-554 Cisco IOS Network Security
Hecrocro1.7K views
Day3 Backup by Jai4uk
Day3 BackupDay3 Backup
Day3 Backup
Jai4uk2.2K views

Similar to Cansecwest - The Death of AV defence in depth

Attacking antivirus by
Attacking antivirusAttacking antivirus
Attacking antivirusUltraUploader
215 views21 slides
Breaking av software by
Breaking av softwareBreaking av software
Breaking av softwareThomas Pollet
3.4K views107 slides
Breaking Antivirus Software by
Breaking Antivirus SoftwareBreaking Antivirus Software
Breaking Antivirus Softwarerahmanprojectd
413 views107 slides
Breaking Antivirus Software - Joxean Koret (SYSCAN 2014) by
Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)
Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)Akmal Hisyam
3K views107 slides
Breaking av software by
Breaking av softwareBreaking av software
Breaking av softwareJoxean Koret
27.8K views107 slides
Computer viruses by
Computer virusesComputer viruses
Computer virusesAbir Almaqrashi
3.5K views16 slides

Similar to Cansecwest - The Death of AV defence in depth(20)

Breaking Antivirus Software - Joxean Koret (SYSCAN 2014) by Akmal Hisyam
Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)
Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)
Akmal Hisyam3K views
Breaking av software by Joxean Koret
Breaking av softwareBreaking av software
Breaking av software
Joxean Koret27.8K views
Op Sy 03 Ch 61 by Google
Op Sy 03 Ch 61Op Sy 03 Ch 61
Op Sy 03 Ch 61
Google284 views
Chapter 09 by Google
Chapter 09Chapter 09
Chapter 09
Google471 views
Bsides Tampa Blue Team’s tool dump. by Alexander Kot
Bsides Tampa Blue Team’s tool dump.Bsides Tampa Blue Team’s tool dump.
Bsides Tampa Blue Team’s tool dump.
Alexander Kot141 views
44CON 2014 - Breaking AV Software by 44CON
44CON 2014 - Breaking AV Software44CON 2014 - Breaking AV Software
44CON 2014 - Breaking AV Software
44CON2.6K views
Security Challenges of Antivirus Engines, Products and Systems by Antiy Labs
Security Challenges of Antivirus Engines, Products and SystemsSecurity Challenges of Antivirus Engines, Products and Systems
Security Challenges of Antivirus Engines, Products and Systems
Antiy Labs1.1K views
Bypass_AV-EDR.pdf by Farouk2nd
Bypass_AV-EDR.pdfBypass_AV-EDR.pdf
Bypass_AV-EDR.pdf
Farouk2nd224 views
Two-For-One Talk: Malware Analysis for Everyone by Paul Melson
Two-For-One Talk: Malware Analysis for EveryoneTwo-For-One Talk: Malware Analysis for Everyone
Two-For-One Talk: Malware Analysis for Everyone
Paul Melson1.9K views
WatchGuard - Cryptolocker en het gevecht tegen IT 's grootste vijand - Orbid ... by Orbid
WatchGuard - Cryptolocker en het gevecht tegen IT 's grootste vijand - Orbid ...WatchGuard - Cryptolocker en het gevecht tegen IT 's grootste vijand - Orbid ...
WatchGuard - Cryptolocker en het gevecht tegen IT 's grootste vijand - Orbid ...
Orbid454 views
Reducing attack surface on ICS with Windows native solutions by Jan Seidl
Reducing attack surface on ICS with Windows native solutionsReducing attack surface on ICS with Windows native solutions
Reducing attack surface on ICS with Windows native solutions
Jan Seidl1.6K views

More from Thierry Zoller

BLtouch marlin configuration by
BLtouch marlin configurationBLtouch marlin configuration
BLtouch marlin configurationThierry Zoller
901 views5 slides
Neo coolcam - smart-plug user guide v2 - Zwave by
Neo coolcam  - smart-plug user guide v2 - ZwaveNeo coolcam  - smart-plug user guide v2 - Zwave
Neo coolcam - smart-plug user guide v2 - ZwaveThierry Zoller
10.3K views10 slides
Heise Security - Scheunentor Bluetooth by
Heise Security - Scheunentor BluetoothHeise Security - Scheunentor Bluetooth
Heise Security - Scheunentor BluetoothThierry Zoller
529 views44 slides
23c3 Bluetooth hacking revisited by
23c3 Bluetooth hacking revisited23c3 Bluetooth hacking revisited
23c3 Bluetooth hacking revisitedThierry Zoller
823 views41 slides
Hack.lu 2006 - All your Bluetooth is belong to us by
Hack.lu 2006 - All your Bluetooth is belong to usHack.lu 2006 - All your Bluetooth is belong to us
Hack.lu 2006 - All your Bluetooth is belong to usThierry Zoller
314 views51 slides
Managing Application Security Risk in Enterprises - Thoughts and recommendations by
Managing Application Security Risk in Enterprises - Thoughts and recommendationsManaging Application Security Risk in Enterprises - Thoughts and recommendations
Managing Application Security Risk in Enterprises - Thoughts and recommendationsThierry Zoller
200 views30 slides

More from Thierry Zoller(11)

BLtouch marlin configuration by Thierry Zoller
BLtouch marlin configurationBLtouch marlin configuration
BLtouch marlin configuration
Thierry Zoller901 views
Neo coolcam - smart-plug user guide v2 - Zwave by Thierry Zoller
Neo coolcam  - smart-plug user guide v2 - ZwaveNeo coolcam  - smart-plug user guide v2 - Zwave
Neo coolcam - smart-plug user guide v2 - Zwave
Thierry Zoller10.3K views
Heise Security - Scheunentor Bluetooth by Thierry Zoller
Heise Security - Scheunentor BluetoothHeise Security - Scheunentor Bluetooth
Heise Security - Scheunentor Bluetooth
Thierry Zoller529 views
23c3 Bluetooth hacking revisited by Thierry Zoller
23c3 Bluetooth hacking revisited23c3 Bluetooth hacking revisited
23c3 Bluetooth hacking revisited
Thierry Zoller823 views
Hack.lu 2006 - All your Bluetooth is belong to us by Thierry Zoller
Hack.lu 2006 - All your Bluetooth is belong to usHack.lu 2006 - All your Bluetooth is belong to us
Hack.lu 2006 - All your Bluetooth is belong to us
Thierry Zoller314 views
Managing Application Security Risk in Enterprises - Thoughts and recommendations by Thierry Zoller
Managing Application Security Risk in Enterprises - Thoughts and recommendationsManaging Application Security Risk in Enterprises - Thoughts and recommendations
Managing Application Security Risk in Enterprises - Thoughts and recommendations
Thierry Zoller200 views
All your Bluetooth is belong to us - the rest too. by Thierry Zoller
All your Bluetooth is belong to us - the rest too.All your Bluetooth is belong to us - the rest too.
All your Bluetooth is belong to us - the rest too.
Thierry Zoller248 views
IPV6 - Threats and Countermeasures / Crash Course by Thierry Zoller
IPV6 - Threats and Countermeasures / Crash CourseIPV6 - Threats and Countermeasures / Crash Course
IPV6 - Threats and Countermeasures / Crash Course
Thierry Zoller1.1K views
The Rise of the Vulnerability Markets - History, Impacts, Mitigations - Thier... by Thierry Zoller
The Rise of the Vulnerability Markets - History, Impacts, Mitigations - Thier...The Rise of the Vulnerability Markets - History, Impacts, Mitigations - Thier...
The Rise of the Vulnerability Markets - History, Impacts, Mitigations - Thier...
Thierry Zoller272 views
SSL Audit - The SSL / TLS Scanner by Thierry Zoller
SSL Audit -  The SSL / TLS ScannerSSL Audit -  The SSL / TLS Scanner
SSL Audit - The SSL / TLS Scanner
Thierry Zoller1.6K views
The TLS/SSLv3 renegotiation vulnerability explained by Thierry Zoller
The TLS/SSLv3 renegotiation vulnerability explainedThe TLS/SSLv3 renegotiation vulnerability explained
The TLS/SSLv3 renegotiation vulnerability explained
Thierry Zoller71.4K views

Recently uploaded

UNIT XIII Cognitive Process.pptx by
UNIT XIII Cognitive Process.pptxUNIT XIII Cognitive Process.pptx
UNIT XIII Cognitive Process.pptxProf. (Dr.) Rahul Sharma
96 views62 slides
Deafening Silence by
Deafening SilenceDeafening Silence
Deafening SilenceSarah Carpino
42 views14 slides
Competition and Professional Sports – BUDZINSKI – December 2023 OECD discussion by
Competition and Professional Sports – BUDZINSKI – December 2023 OECD discussionCompetition and Professional Sports – BUDZINSKI – December 2023 OECD discussion
Competition and Professional Sports – BUDZINSKI – December 2023 OECD discussionOECD Directorate for Financial and Enterprise Affairs
304 views6 slides
Ex-post Assessment of Merger Remedies – OECD – December 2023 OECD discussion by
Ex-post Assessment of Merger Remedies – OECD – December 2023 OECD discussionEx-post Assessment of Merger Remedies – OECD – December 2023 OECD discussion
Ex-post Assessment of Merger Remedies – OECD – December 2023 OECD discussionOECD Directorate for Financial and Enterprise Affairs
61 views7 slides
Out-of-Market Efficiencies in Competition Enforcement – ROSENBOOM – December ... by
Out-of-Market Efficiencies in Competition Enforcement – ROSENBOOM – December ...Out-of-Market Efficiencies in Competition Enforcement – ROSENBOOM – December ...
Out-of-Market Efficiencies in Competition Enforcement – ROSENBOOM – December ...OECD Directorate for Financial and Enterprise Affairs
74 views10 slides

Recently uploaded(20)

تنزيل (1).pdf DVT by taalali1
تنزيل (1).pdf  DVT تنزيل (1).pdf  DVT
تنزيل (1).pdf DVT
taalali19 views
RTC2023_Boost-App-Integration-with-AI_Kim.pdf by hossenkamal2
RTC2023_Boost-App-Integration-with-AI_Kim.pdfRTC2023_Boost-App-Integration-with-AI_Kim.pdf
RTC2023_Boost-App-Integration-with-AI_Kim.pdf
hossenkamal28 views
Learning from Disaster - How a positive safety approach saves lives_MYOSH Web... by kristinashields1
Learning from Disaster - How a positive safety approach saves lives_MYOSH Web...Learning from Disaster - How a positive safety approach saves lives_MYOSH Web...
Learning from Disaster - How a positive safety approach saves lives_MYOSH Web...
kristinashields139 views
Maximiliano Roa - eRetail Week Blended [Professional] Experience 2023 by eCommerce Institute
Maximiliano Roa - eRetail Week Blended [Professional] Experience 2023Maximiliano Roa - eRetail Week Blended [Professional] Experience 2023
Maximiliano Roa - eRetail Week Blended [Professional] Experience 2023

Cansecwest - The Death of AV defence in depth

  • 1. The Death of AV Defense in Depth ? - revisiting Anti-Virus Software Sergio Alvarez – Director of Research Thierry Zoller – Security Engineer
  • 2.  Sergio Alvarez > Director of Research @ n.runs AG > Argentine > Lives in Berlin since 2005  Thierry Zoller > Security Engineer @ n.runs AG > Author of BTCrack, Secure-it, Harden-it > Luxembourg Revisiting AV Software ? > Who are we ? Who are we ?
  • 3.  Attacking the Parsing Engines to Own the AV Software > Sergio Alvarez  Attacking the Parsing Engines to ByPass Detection > Thierry Zoller (For reasons beyond his control couldn’t be here today) Revisiting AV Software ? What will we talk about ?
  • 4. Common Problems (Software, Vendor Notification) 1 Introduction – AV DiD – AV Problems related to Email 2 Introduction – AV DiD 3 Hunting Bugs Death of AV Defense in Depth ? > TOC 4 The Result and Demos
  • 5.  This talk is NOT about the Death of DiD as a concept.  This talk is about > questioning real-life implementations of DiD, specifically as implemented for Anti-Virus solutions and Email Security (“AV DiD”) > showing the threat is real (Demos) > discovering new bugs =) Death of AV Defense in Depth ? > Introduction Introduction
  • 6.  Defense in Depth (DiD) originally is a concept as used by ancient Military. Main Goal : Get more time  In General “The paradigm describes an approach where you assume that individual (even multiple) elements of your defense fall, in the worst possible way “ Death of AV Defense in Depth ? > Military The Roots of „Defense In Depth“
  • 7. Death of AV Defense in Depth ? > IT Security  IT Security DiD is about reducing the attack surface  IT Security DiD is about having multiple redundant security measures  AV DiD is generally being defined and promoted according to this logic (and best practices) :  The Problem : You think you have implemented DiD when in reality you have not , you just created a much bigger problem. Let us explain. Transposing DiD to AV and IT Security in General Corporate User Corporate Mail ServerMail Gateway * Vendor names were chosen randomly
  • 8.  Recap : In General “The paradigm describes an approach where you assume that individual (even multiple) elements of your defense fall, in the worst possible way “  Where is the Problem ? Current AV DiD implementations define “the worst possible way” an Anti-virus product may fail as “Fails to detect a threat” or “Fails to detect a virus” whereas in reality the worst possible way is a more severe one: Compromise of the underlying OS through the Anti-Virus Engine.  The result is that AV software itself is left with no protection at all, there is rarely any kind of mitigation.  Side-Note : “Worst possible Failure” in general for Security Software (IPS, IDS, AV..)is defined as “fails to detect/react/alert”. Attacks on the Defenses themselves are rarely taken into account.  This has led the industry to deploy AV DiD in a way that is detrimental to the concept > Multiple AV engines running on critical Servers with high privileged rights > AV Engines everywhere, high privileges, unprotected. > Mail gateways > Servers (WWW, DB, Fileserver..) > Clients > … [1] “Anti-Virus Defense in Depth” - Microsoft Death of AV Defense in Depth ? > Problem Where is the Problem ?
  • 9. Anti-Virus Software > Anti-Virus Software is everywhere So where is the problem ?
  • 10. Anti-Virus Software > Anti-Virus Software is everywhere So where is the problem ? AV AV AV AV AV AV AV AV AV AV AV AV
  • 11.  Antivirus Security Myths : > Antivirus Software is secure > Makes our network and systems more secure  Antivirus Developers Myths : > AV Software is developed by security experts  Antivirus Detection Myths : > I use Antivirus Software, I will not get infected > My Antivirus Software detects even unknown viruses Anti-Virus Software > Myths Why bother ? AV Software is secure by design…
  • 12.  Antivirus Security Facts : > HUGE Attack surface > Parse thousands of formats (Kaspersky claims over 3000) > Programmed in unmanaged languages (Performance) > It takes time and resources to re-create the AV engines from scratch In managed languages (read: bugs will stay here for a while) > The result : Antivirus have to deal with so many file formats that chances are good there is more than one security flaw  Antivirus History > First developed to protect against Boot Sector and Viruses > Infection Vector : Disc > Overhauled to protect against Worms > Infection Vector : Network > Overhauled yet again to work on Servers/Gateways > Code ported, Logic not adapted (see Bypass) Anti-Virus Software > Facts Here are the facts • Code reused – 15 years • Logic not adapted to new vectors • Vulnerabilities ported over
  • 13.  It gets even worse : > More parsing code as AV software mutates to an All-in-one Solution > They now start coming with IDS/IPS functions > The more engines are involved, more potential bugs are involved, you are unknowingly increasing the attack surface by following best practices.  A small sample from these widely supported formats (includes variants) > Zip, Zip SFX, ARJ, ARJ, SFX, TAR, GZ, ZOO, UUEncode, TNEF, MIME, BINHEX, MSCompress, CAB, CAB SFX, LZH, LZH SFX, LHA, RAR, RAR SFX, JAR, BZ2, Base64, Mac Binary, ASPack, CHM, DOC, EML, EXE, FSG, HLP,PDF, Yoda, ELF, PPT, OPD, and many more. > If the creators of these file types themselves have problems parsing them, what are the chances for the antivirus to get them all right? (scary, isn't it?) Anti-Virus Software > Facts Here are the Facts
  • 14.  Want to try it yourself? : > Open your favourite AV in IDA Pro (4.9 is free) > ALT+t and search for ‘RAR’ > Double click and check what file formats it supports.  The following is a RAW output from a random AV solution: > 7z, zip, exe, arj, tar, gz, bz, ace, tgz, uue, xxe, lzh, lha, ice, com, zoo, dat, ??_, cab, rar, jar, 386, ? HT*, ACM, ADE, ADP, ANI, APP, ASD, ASF, ASP, ASX, AWX, AX, BAS, BAT, BIN, BOO, CDF, CHM, CLASS, CMD, CNV, CPL, CRT, CSH, DLL, DLO, DO?, DOC, DRV, EMF, EML, FLT, FOT, HLP, HT*, INF, INI, INS, ISP, J2K, JFF, JFI, JFIF, JIF, JMH, JNG, JP2, JPE, JPEG, JPG, JS*, JSE, LNK, MD?, MDB, MOD, MS?, NWS, OBJ, OCX, OLB, OSD, OV?, PCD, PDF, PDR, PGM, PHP, PIF, PKG, PL*, PNG, POT, PPS, PPT, PRG, REG, RPL, RTF, SBF, SCR, SCRIPT, SCT, SH, SIS, SHA, SHB, SHS, SHTM*, SPL, SWF, SYS, TLB, TMP, TSP, TTF, URL, VB?, VCS, VLM, VXD, VXO, WIZ, WLL, WMD, WMF, WMS, WMZ, WPC, WSC, WSF, WSH, WWK, XL?, XML Anti-Virus Software > Facts Here are the Facts .rdata:601EA638 String2 db '.rar',0 ; DATAXREF: sub_601CE320+165o … .rdata:601EA65C ; char aSfx[] .rdata:601EA65C aSfx db 'sfx',0 ; DATAXREF: sub_601CF6E0+88o .rdata:601EA660 ; char aExe[] .rdata:601EA660 aExe db 'exe',0 ; DATAXREF: sub_601CF6E0+6Do … etc
  • 15. Antivirus Software is a must have Anti-Virus Software > Facts Here are the Facts
  • 16. Common Problems (Software, Vendor Notification)2 Introduction – AV DiD1 Common Problems (Software, Vendor Notification) 3 Hunting Bugs Death of Defense in Depth ? > TOC 4 The Result and Demos
  • 17.  Communication Protocols Security by Obscurity > Hard coded passwords in the binaries  Improper Password Handling > Storing the password of the administration console in the client's configuration file, too. (TrendMicro did this some time ago, 'encrypted' with a char depending on position mutation algorithm.)  Client Listeners Standard Security Issues  NULL DACLs > Registry for Settings > Configuration Files > Handles Anti-Virus Software > General problems Common Problems
  • 18. Anti-Virus Software > General problems
  • 19.  We report every bug to the vendor before publishing *any* Information > It’s difficult ! > Even finding the correct person to talk to > secure@ / security@ - do not always exist > Bugs are more often than not fixed quietly > 10 Bugs reported transformed in 1 Bug being published (“Fixed Archive bypass”) > For Bypasses - Risk Rating is often a joke > Don’t make the difference between Client and Gateway Solutions > We spent days explaining bugs : > “It just crashes because it jump invalid memory location, EIP points to x41414141, that address does not exist, it’s not a security Problem…” > Hey, but that exceptions is handled ! Anti-Virus Software > General problems Vulnerability Notification
  • 20. Anti-Virus Software > General problems Vendor Responses
  • 21. Anti-Virus Software > General problems Vendor Responses
  • 22. Anti-Virus Software > General problems Vendor Responses The Problem is Winrar & Winzip can extract that file – this makes it a security problem if this file is reported as clean. Who here in this Room uses Winrar or Winzip ?
  • 23. Anti-Virus Software > General problems Vendor Responses
  • 24. Anti-Virus Software > General problems Vendor Responses
  • 25. Common Problems (Software, Vendor Notification) 3 Introduction – AV DiD1 2 Hunting Bugs Death of Defense in Depth ? > TOC 4 The Result and Demo Hunting Bugs
  • 26.  AV Bypass / Evasion  Problem widely known since 2005, nearly no vendor reacted to early reports Wakeup call 3 months after revealed nearly none of them had patched the bypasses  What is AV Evasion ? > Key concept : AV engine cannot extract an archive, but the user can > Why is this important ? > Sneaking malicious code through gateways, hiding content in general, infected files on fileservers etc. > Typical arguments from AVvendors : > Argument 1 We will catch the malicious code at run-time (on-access) so bypasses are no threats. > Problem: Your Gateway/Server Solutions do NOT execute the code, so there is NO on-access scan as there is no access/execution. As such the engine cannot scan the files inside and will generally flag the file as clean (Consequences might be: Mail is sent further and marked as clean, file is downloaded etc.) > This is also a problem for AV clients if they are run in an environment where files are not executed (Fileservers, Mails, Web servers, Online Mail services etc.) > Argument 2 “It’s the same than adding a Password to a Zip file, we can’t scan these either” This is why companies often choose to have GW Policies to generally forbid encrypted files (and have them allowed for specific addresses upon request), for the simple reason that they cannot be scanned. Furthermore for these encrypted files, AV engines in general add a Banner/Title to indicate the file was not scanned “File not scanned” indicating that it should be treated as such, this warning does not show for bypasses. Anti-Virus Software > Hunting Bugs Anti-Virus Bypass
  • 27.  Bypasses: F-Secure as of to-date is the only AV vendor we are aware of that estimates the risk in the advisories according to where and how the product is used > Low Risk for Client Software > High Risk for Gateway Products  Message to AV companies : Your goal is to detect malicious code, do not flag supported archive formats as clean if you error on parsing them. (Flag supported archive formats as unscanned/suspicious, because the engine wasn’t able to scan the content) Anti-Virus Software > Hunting Bugs Anti-Virus Bypass
  • 28.  Example of a bypass  Version_needed_to_extract Field (ZIP) > Extracts without errors in Winrar (i.e. the user will execute whatever is inside) Anti-Virus Software > Hunting Bugs Anti-Virus Bypass “Vulnerable” 20 AV Vendors
  • 29.  Example of a bypass  Adding a EXE header (MZ) to a RAR file > Winrar extracts file without Errors Anti-Virus Software > Hunting Bugs Anti-Virus Bypass Addendum 11/2007: TZO: It has come to my attention that this bug was a re-discovery, In OCT 2005 somebody by the nickname of fRoGGz found this issue and published the results: CVE | BID . This also means that what you see is a list of vendors might not have reacted since 2005 or have introduced the same bug. “Vulnerable” 16 AV Vendors
  • 30.  Attack Vectors Testing > Entry Points Runtime Analysis > Wireshark > Cdb > OllyDbg > Dum(b)ug > PaiMei (win32) > vtrace (multiplatform debugging framework) > Sysinernals tools, etc > Parsers Analysis (idem above – Wireshark + IDA) > Fuzzing > Peach, Sulley, custom scripts, etc. Anti-Virus Software > Hunting Bugs Hunting Bugs
  • 31.  Fuzzing Techniques (Generators + Publishers + Debug APIs) > Fuzzing Engine > Customizable structures to represent the datatypes > Supports structure recursions (embedded structures) > Add customized structures on the fly (responses based) > Function Call Interception (script on top of vtrace) > Argument/Return value manipulation in runtime > Allows to fuzz virtually (almost) anything > Runtime tracing (customised scripts on top of vtrace) > Automated Tracing > Function Call Hijacking > Multiplatform (Windows, Linux, MacOSX) > Easy to extend Anti-Virus Software > Hunting Bugs Hunting Bugs
  • 32. Anti-Virus Software > Hunting Bugs Hunting Bugs A . L o c a l f i l e h e a d e r : lo c a l file h e a d e r s ig n a tu r e 4 b y te s ( 0 x 0 4 0 3 4 b 5 0 ) v e r s io n n e e d e d t o e x t r a c t 2 b y te s g e n e r a l p u r p o s e b it fla g 2 b y te s c o m p r e s s io n m e t h o d 2 b y te s la s t m o d fi le tim e 2 b y te s la s t m o d file d a te 2 b y te s c r c - 3 2 4 b y te s c o m p r e s s e d s i z e 4 b y te s u n c o m p r e s s e d s i z e 4 b y te s f i l e n a m e l e n g t h 2 b y te s e x t r a f i e l d l e n g th 2 b y te s f i l e n a m e ( v a r ia b le s iz e ) e x t r a f i e l d ( v a r ia b le s iz e ) B . D a t a d e s c r i p t o r : c r c - 3 2 4 b y te s c o m p r e s s e d s i z e 4 b y te s u n c o m p r e s s e d s i z e 4 b y te s C . C e n t r a l d i r e c t o r y s tr u c t u r e : c e n tr a l file h e a d e r s ig n a tu r e 4 b y te s ( 0 x 0 2 0 1 4 b 5 0 ) v e r s io n m a d e b y 2 b y te s v e r s io n n e e d e d t o e x t r a c t 2 b y te s g e n e r a l p u r p o s e b it fla g 2 b y te s c o m p r e s s io n m e t h o d 2 b y te s la s t m o d file tim e 2 b y te s la s t m o d file d a te 2 b y te s c r c - 3 2 4 b y te s c o m p r e s s e d s i z e 4 b y te s u n c o m p r e s s e d s i z e 4 b y te s f i l e n a m e l e n g t h 2 b y te s e x t r a f i e l d l e n g t h 2 b y te s f i l e c o m m e n t l e n g t h 2 b y te s d is k n u m b e r s ta rt 2 b y te s PKZIP Principal Targets - Size/Length fields - String Fields
  • 33. Anti-Virus Software > Hunting Bugs Hunting Bugs PKZIP
  • 34.  Some Tips > Simultaneous fields fuzzing does give very good results > When a file type has a TLV structure, don’t fuzz only one stage only, it’s always more effective to use multiple TLV instances. > Look for Path-Flow Coverage, not for Code Coverage > When exploiting heap massaging is easily accomplished with embedded compressed files ;), use it! > If you want to target multiple engines at once, compress your exploits together in the same file > Files names and files other IS IMPORTANT,the engines analyze them in that same order. Anti-Virus Software > Hunting Bugs Hunting Bugs
  • 35.  Useful links with files specs > http://www.wotsit.org/ > And Google a lot ;) > Microsoft files type specs are available at Microsoft website. Anti-Virus Software > Hunting Bugs Hunting Bugs
  • 36. Common Problems (Software, Vendor Notification) 4 Introduction – AV DiD 2 3 Hunting Bugs Death of Defense in Depth ? > TOC 1 Demos / New Techniques / No Recording <-The Result and Demo
  • 37.  End up in: > Unprotected Settings (wrong DACLs) > Detection Bypass / Evasion > Low Impact for AV clients, Important for Gateways > Privilege Escalation > DoS > AV dies, Mail service continues > AV dies, takes OS with it, no more mails > Blue Screen of Death > Remote Code Execution > Complete Network Environment Compromise Anti-Virus Software > Facts The Result Question : Who recognizes this Email service ?
  • 38.  The Result : 25.07.2007 CA eTrust - Denial of Service Advisory [CHM] 23.07.2007 Norman Antivirus - Denial of Service Advisory [DOC] 23.07.2007 Norman Antivirus - Detection Bypass Advisory [ DOC] 23.07.2007 Norman Antivirus - Arbitrary Code Execution Advisory [LZH] 23.07.2007 Norman Antivirus - Arbitrary Code Execution Advisory [ACE] 20.07.2007 Panda Antivirus - Arbitrary Code Execution [EXE] 20.07.2007 ESET NOD32 - Denial of Service [ASPACK+FSG] 20.07.2007 ESET NOD32 - Denial of Service [ASPACK] 20.07.2007 ESET NOD32 - Arbitrary Code Execution [CAB] 04.06.2007 F-Secure Denial of Service [FSG] 04.06.2007 F-Secure Denial of Service [ARJ] 01.06.2007 F-Secure Remote Code Execution [LZH] 30.05.2007 Avira Antivir Infinite Loop [TAR] 29.05.2007 Avira Antivir Divide By Zero [UPX] 28.05.2007 Avira Antivir Abitrary Remote Code Execution [LZH] 25.05.2007 Avast ! Heap Overflow [SIS] 24.04.2007 Avast! Heap Overflow [CAB] Anti-Virus Software > Facts The Result +100 Vulnerabilities reported just by Sergio @40 fixed @20 didn’t even replay Over 800 bypasses some refuse to fix at all..
  • 39.  Don’t forget : AV Software runs also on your Email Architecture! > Gateway (MX) > Corporate Mail Server (Real-time & Scheduled) > Client  Why does this change what is at stake? > Email comes in from the outside > Email travels through your internal network > Email goes through your Firewalls Anti-Virus Software > E-Mail AV Vulnerabilities as related to Email traffic Oops, suddenly AV Vulnerabilities seem a lot more dangerous. What if non-trusted code gets executed on the Corporate Mail Server ?
  • 40. Anti-Virus Software > Email AV Vulnerabilities - Increase of Attack Surface Corporate User Mail Gateway Attacker Internet DMZ Proxy Server Trusted Zone Corporate Mail Server DNS Server Multiple AV Engines, different vendors ->Increase of Attack surface AV software running with privileged rights on critical parts of infrastructure. Paradox: “The more you protect yourself the more vulnerable you become”
  • 41. Anti-Virus Software > Email Exploit Staging - Oversimplified Corporate User Mail Gateway Attacker Internet DMZ Proxy Server Trusted Zone Corporate Mail Server DNS Server Oversimplification : • Attacker sends an e-mail with a attachment targeting the Symantec Engine • Avira on the Mail gateway does recognize a threat and the Mail is passed on • The Attachment hits the Corporate Server where the exploit triggers • Attacker gets a shell 1 2 3 4
  • 42. Anti-Virus Software > Hunting Bugs Demo Demo
  • 43.  This is just the top of the iceberg > IPSs/IDSs deal with +100 protocols  Paradox > “The more you protect yourself the more vulnerable you become” Anti-Virus Software > Final Words Final Words
  • 44.  n.runs opened a Pandora's Box > There is no doubt things will get worse > Lots of more bugs to come  Before going public, n.runs looked for a Solution, there was no easy one, hence :  n.runs is developing a secure system solution. The core of this solution is based on innovative architecture and software. The foundation for this development is based upon the years of consulting experience that n.runs has collected in IT security, infrastructure and processes.  At this time the final tests are being performed. The market introduction begins in the 4th quarter of 2007. Anti-Virus Software > Final Words Final Words
  • 45.  The solution developed by n.runs under the code name "ParsingSafe " will build on and work together with the customer antivirus products that are already in place or that are planned to be put in place.  Based on this, the antivirus vendors are very important technology partners for our solution. The goal of the customer is still primarily to have the highest rate of virus recognition possible but now embedded in a highly secure architecture that will prevent successful attacks on the AV products.  For more information, please contact: Torsten Pressel, Director of Software Sales n.runs AG Tel.: +49 6171 699-576 Email: parsingsafe@nruns.com Web: http://www.nruns.com/ps Anti-Virus Software > Final Words Final Words
  • 46. Anti-Virus Software > Final Words Final Words Thank you for your Attention Sergio Alvarez Sergio.Alvarez@nruns.com Thierry Zoller Thierry.Zoller@nruns.com
  • 47.  Vtrace, http://kenshoto.com/vtrace  Paimei, http://code.google.com/p/paimei/  n.bug, http://www.nruns.com/security_tools.php  Peach Fuzzing Framework, http://peachfuzz.sourceforge.net  SysInternals Tools, http://www.sysinternals.com  Dum(b)ug, http://www.phenoelit-us.org/fr/tools.html  Wireshark, http://www.wireshark.org  Windows Debugging Tools, http://www.microsoft.com/whdc/devtools/debugging  IDA Pro, http://www.hex-rays.com/idapro/  OllyDbg, http://www.ollydbg.de Anti-Virus Software > Final Words References