Advanced Excel Hacking Workshop 
Didier Stevens 
http://.DidierStevens.com/excel.zip
No Exploits 
Just Features
Unzip excel.zip to c:excel 
Password: Workshop
VBA (Visual Basic for Applications) 
is a complete Windows programming language
VBS (Visual Basic Script) 
is NOT a complete Windows programming 
language
VBA has access to the Windows API
VBA: MS Office (Word, Excel Powerpoint, …), 
AutoCAD, ...
Excel: what I prefer as a User Interface
44CON 2014 - Advanced Excel Hacking, Didier Stevens
44CON 2014 - Advanced Excel Hacking, Didier Stevens
Exercise 1: 
“Hello World” message box with VBA
VBA7 
Introduced with Office 2010 
Support for 64-bit
32-bit Excel or 64-bit Excel?
Excel 2007 or earlier: 32-bit
Excel 2010 or 2013: 
Check File/Help
44CON 2014 - Advanced Excel Hacking, Didier Stevens
3 new VBA7 keywords: 
PtrSafe 
LongLong 
LongPtr
2 new VBA7 compilation constants 
VBA7 
Win64
I use Win64 
If Win64 is defined, I know that I'm using VBA7 on 
a 64-bit application 
Thus I use the new keywords 
(PtrSafe, LongLong, LongPtr)
If Win64 is not defined, I know that I am on 32-bit 
application. 
And then I DO NOT use the new keywords.
Exercise 2: 
“Hello World” message box with API 
32-bit, 64-bit & both
API functions: 
not only basic types as arguments, 
but also structures
Private Declare PtrSafe Sub GetSystemTime Lib 
"kernel32.dll" (st As SYSTEMTIME)
Private Type SYSTEMTIME 
wYear As Integer 
wMonth As Integer 
wDayOfWeek As Integer 
wDay As Integer 
wHour As Integer 
wMinute As Integer 
wSecond As Integer 
wMilliseconds As Integer 
End Type
Exercise 3: 
GetSystemTime 
32-bit, 64-bit & both
InstalledPrograms
NetworkMashup-32
TaskManager.xls / TaskManagerSC.xls
Problem: writing a lot of VBA code
Datapipe
Modify C source code datapipe 
datapipe.exe → datapipe.dll
44CON 2014 - Advanced Excel Hacking, Didier Stevens
44CON 2014 - Advanced Excel Hacking, Didier Stevens
DLL to shellcode 
CreateMemoryModuleShellCode.py datapipe-dll. 
dll datapipe-dll.dll.bin
Shellcode to VBA 
shellcode2vba.py datapipe-dll.dll.bin datapipe-dll. 
dll.bin.base64.vba
ReactOS cmd and regedit
44CON 2014 - Advanced Excel Hacking, Didier Stevens
44CON 2014 - Advanced Excel Hacking, Didier Stevens
44CON 2014 - Advanced Excel Hacking, Didier Stevens
Putty
20% discount sale for Brucon: 
PDF Analysis workshop videos on CD: €20 
White Hat Shellcode workshop videos on CD: €20 
x64 workshop videos on CD: €20 
All videos on CD: €50 
http://DidierStevensLabs.com

More Related Content

PDF
5_Practice_Exercise_-_1
PPTX
プレゼンテーション2
PDF
business articles
PDF
6 ways to hack your JavaScript application by Viktor Turskyi
PPTX
Chat Passion Series
PPTX
Advanced Excel Demo
PPT
Advanced Excel - HeroConf Philadelphia
PDF
Advanced Microsoft Excel
5_Practice_Exercise_-_1
プレゼンテーション2
business articles
6 ways to hack your JavaScript application by Viktor Turskyi
Chat Passion Series
Advanced Excel Demo
Advanced Excel - HeroConf Philadelphia
Advanced Microsoft Excel

Similar to 44CON 2014 - Advanced Excel Hacking, Didier Stevens (20)

PDF
Viva64: working up of 64-bit applications
PDF
De05_panagenda_Prepare-Applications-for-64-bit-Clients.pdf
PDF
Bt0082 visual basic
PPTX
01. introduction to-programming
PDF
Developer Special: How to Prepare Applications for Notes 64-bit Clients
PDF
OpenWhisk by Example - Auto Retweeting Example in Python
PPT
Introduction to Programming Lesson 01
PPT
What's New in Visual Studio 2008
DOCX
PT1420 File Access and Visual Basic .docx
PDF
Unit -II Introduction to visual programming.pdf
PPT
01 Introduction to programming
PDF
A Dictionary Of Vb .Net
PDF
Static code analysis and the new language standard C++0x
PDF
Static code analysis and the new language standard C++0x
DOC
ASSIGNMENT
PDF
Lesson 6. Errors in 64-bit code
PDF
64 bits, Wp64, Visual Studio 2008, Viva64 and all the rest...
PDF
A Collection of Examples of 64-bit Errors in Real Programs
DOCX
C tutorials
PDF
Static code analysis for verification of the 64-bit applications
Viva64: working up of 64-bit applications
De05_panagenda_Prepare-Applications-for-64-bit-Clients.pdf
Bt0082 visual basic
01. introduction to-programming
Developer Special: How to Prepare Applications for Notes 64-bit Clients
OpenWhisk by Example - Auto Retweeting Example in Python
Introduction to Programming Lesson 01
What's New in Visual Studio 2008
PT1420 File Access and Visual Basic .docx
Unit -II Introduction to visual programming.pdf
01 Introduction to programming
A Dictionary Of Vb .Net
Static code analysis and the new language standard C++0x
Static code analysis and the new language standard C++0x
ASSIGNMENT
Lesson 6. Errors in 64-bit code
64 bits, Wp64, Visual Studio 2008, Viva64 and all the rest...
A Collection of Examples of 64-bit Errors in Real Programs
C tutorials
Static code analysis for verification of the 64-bit applications

More from 44CON (20)

ODP
They're All Scorpions - Successful SecOps in a Hostile Workplace - Pete Herzo...
PPTX
How to Explain Post-Quantum Cryptography to a Middle School Student - Klaus S...
PPTX
Using SmartNICs to Provide Better Data Center Security - Jack Matheson - 44CO...
PDF
JARVIS never saw it coming: Hacking machine learning (ML) in speech, text and...
PDF
Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...
PDF
The UK's Code of Practice for Security in Consumer IoT Products and Services ...
PDF
Weak analogies make poor realities – are we sitting on a Security Debt Crisis...
PDF
Pwning the 44CON Nerf Tank
PDF
Security module for php7 – Killing bugclasses and virtual-patching the rest! ...
PDF
44CON London 2015 - Stegosploit - Drive-by Browser Exploits using only Images
PDF
44CON London 2015 - Is there an EFI monster inside your apple?
PPTX
44CON London 2015 - Indicators of Compromise: From malware analysis to eradic...
PPTX
44CON London 2015 - How to drive a malware analyst crazy
PDF
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
PDF
44CON London 2015 - Going AUTH the Rails on a Crazy Train
PDF
44CON London 2015 - Software Defined Networking (SDN) Security
PDF
44CON London 2015 - DDoS mitigation EPIC FAIL collection
PDF
44CON London 2015 - Hunting Asynchronous Vulnerabilities
PDF
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
PDF
44CON London 2015 - Jtagsploitation: 5 wires, 5 ways to root
They're All Scorpions - Successful SecOps in a Hostile Workplace - Pete Herzo...
How to Explain Post-Quantum Cryptography to a Middle School Student - Klaus S...
Using SmartNICs to Provide Better Data Center Security - Jack Matheson - 44CO...
JARVIS never saw it coming: Hacking machine learning (ML) in speech, text and...
Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...
The UK's Code of Practice for Security in Consumer IoT Products and Services ...
Weak analogies make poor realities – are we sitting on a Security Debt Crisis...
Pwning the 44CON Nerf Tank
Security module for php7 – Killing bugclasses and virtual-patching the rest! ...
44CON London 2015 - Stegosploit - Drive-by Browser Exploits using only Images
44CON London 2015 - Is there an EFI monster inside your apple?
44CON London 2015 - Indicators of Compromise: From malware analysis to eradic...
44CON London 2015 - How to drive a malware analyst crazy
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
44CON London 2015 - Going AUTH the Rails on a Crazy Train
44CON London 2015 - Software Defined Networking (SDN) Security
44CON London 2015 - DDoS mitigation EPIC FAIL collection
44CON London 2015 - Hunting Asynchronous Vulnerabilities
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Jtagsploitation: 5 wires, 5 ways to root

Recently uploaded (20)

PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PPT
Geologic Time for studying geology for geologist
DOCX
search engine optimization ppt fir known well about this
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Architecture types and enterprise applications.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
Five Habits of High-Impact Board Members
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Unlock new opportunities with location data.pdf
PDF
August Patch Tuesday
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PPTX
The various Industrial Revolutions .pptx
Taming the Chaos: How to Turn Unstructured Data into Decisions
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Geologic Time for studying geology for geologist
search engine optimization ppt fir known well about this
A contest of sentiment analysis: k-nearest neighbor versus neural network
Final SEM Unit 1 for mit wpu at pune .pptx
Architecture types and enterprise applications.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
observCloud-Native Containerability and monitoring.pptx
Five Habits of High-Impact Board Members
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Unlock new opportunities with location data.pdf
August Patch Tuesday
Benefits of Physical activity for teenagers.pptx
Zenith AI: Advanced Artificial Intelligence
Chapter 5: Probability Theory and Statistics
Enhancing emotion recognition model for a student engagement use case through...
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
The various Industrial Revolutions .pptx

44CON 2014 - Advanced Excel Hacking, Didier Stevens