Threat Level: green Handler on Duty: Didier Stevens

SANS ISC: Internet Storm Center - SANS Internet Storm Center Internet Storm Center


Sign Up for Free!   Forgot Password?
Log In or Sign Up for Free!
Last Daily Podcast (Mon, Sep 26th):Analyzing Malicious .PUB Files;

Latest Diaries

VBA and P-code

Published: 2016-09-26
Last Updated: 2016-09-26 10:32:27 UTC
by Didier Stevens (Version: 1)
0 comment(s)

I want to draw your attention to some great work Dr. Bontchev did.

pcodedmp.py is a VBA P-code disassembler. Microsoft Office documents contain VBA macros in several forms. They contain the source code, but also compiled P-code. Dr. Bontchev created a proof-of-concept document that executes P-code and does not contain the corresponding source code. Here is the output from his pcodedmp.py tool for his PoC document:

python pcodedmp.py -d poc2b.doc

Processing file: poc2b.doc
===============================================================================
Module streams:
Macros/VBA/ThisDocument - 1949 bytes
Line #0:
        FuncDefn (Sub / Property Set) func_00000078
Line #1:
        LitStr 0x001D "This could have been a virus!"
        Ld vbInformation
        Ld vbOKOnly
        Add
        LitStr 0x0006 "Virus!"
        ArgsCall MsgBox 0x0003
Line #2:
        LitStr 0x0008 "calc.exe"
        Paren
        ArgsCall Shell 0x0001
Line #3:
        EndSub

 

Dr. Bontchev also coded a plugin for oledump.

Didier Stevens
Microsoft MVP Consumer Security
blog.DidierStevens.com DidierStevensLabs.com

Keywords: maldoc pcode vba
0 comment(s)

If you have more information or corrections regarding our diary, please share.

Recent Diaries

Defining Threat Intelligence Requirements
1 day ago by Pasquale Stirparo (0 comments)

.PUB Analysis
1 day ago by DidierStevens (1 comment)

The era of big DDOS?
3 days ago by Rick (5 comments)

YAHDD! (Yet another HUGE data Breach!)
3 days ago by Rick (0 comments)

OpenSSL Update Released
4 days ago by Dr. J. (2 comments)

Those never-ending waves of Locky malspam
5 days ago by Brad (1 comment)

Windows Events log for IR/Forensics ,Part 2
5 days ago by Basil (1 comment)

Does it Matter If You Cover Your Webcam?
1 week ago by Dr. J. (9 comments)

View All Diaries →

Latest Discussions

Best way to reduce spam?
created 3 days ago by RafealHenco (0 replies)

Best security software to protect my PC!
created 3 days ago by RafealHenco (0 replies)

Level of detail for Info Security Policy
created 1 week ago by Circadian (7 replies)

Strange / Excessive Error Code 400
created 3 weeks ago by JimR (2 replies)

API call to get the IP list at the sources page?
created 3 weeks ago by John (1 reply)

View All Forums →

Latest News

View All News →

Top Diaries

Critical Cisco ASA IKEv1/v2 Vulnerability. Active Scanning Detected
7 months ago by Dr. J. (25 comments)

Voice Message Notifications Deliver Ransomware
1 month ago by Xme (6 comments)

Is "2 out of 3" good enough for Anti-Malware?
1 week ago by Dr. J. (8 comments)

Data Classification For the Masses
1 month ago by Xme (14 comments)

An Approach to Vulnerability Management
3 months ago by Russell (13 comments)