Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Intro. 
To 
Sta+c 
Analysis 
C.K. 
Chen 
2014.09.27
Who 
am 
I 
• C.K 
Chen 
(陳仲寬) 
– P.H.D 
Student 
in 
DSNS 
Lab, 
NCTU 
– BambooFox 
CTF 
– Research 
in 
• Reverse 
Engineering 
• Malware 
Analysis 
• Virtual 
Machine 
• About 
this 
work 
– CHI-­‐WEI 
WANG, 
CHIA-­‐WEI 
WANG, 
CHONG-­‐KUAN 
CHEN 
2
About 
DSNS 
• 謝續平教授 
• 實驗室研究方向 
– 惡意程式分析 
– 虛擬機器 
– 數位鑑識 
– 網路安全 
3
Outline 
• Intro. 
To 
Sta+c 
Analysis 
• Common 
Tools 
inLinux 
for 
Sta+c 
Analysis 
• Disassemble 
• Reverse 
Assambly 
to 
C 
– Fundamental 
ASM 
• IDA 
Pro 
– Prace+ce 
• Tips 
for 
Sta+c 
Analtsis
Intr. 
to 
Sta+c 
Analysis 
• Sta+c 
analysis 
– Analysis 
malware 
without 
execu+on 
• Dynamic 
analysis 
– Execute 
malware 
inside 
controllable 
environment 
and 
monitor 
it’s 
behavior
Informa+on 
from 
Sta+c 
Analysis 
• What 
informa+on 
we 
can 
get 
from 
sta+c 
analysis
Informa+on 
from 
Sta+c 
Analysis 
• What 
informa+on 
we 
can 
get 
from 
sta+c 
analysis 
– File 
Structure 
– Binary 
Code 
– Related 
Module 
– Suspicious 
String
Informa+on 
from 
Sta+c 
Analysis 
• What 
we 
cannot 
get? 
– Register 
Value 
– Memory 
Value 
– Packed 
Code 
– Encrypted 
Message
Usage 
of 
sta+c 
analysis 
• In 
normal 
case, 
there 
are 
some 
problems 
that 
sta+c 
analysis 
is 
involved 
– Reverse: 
Windows, 
Linux 
– Pwned(Exploit): 
Linux, 
Windows(rare) 
• Complement 
to 
the 
dynamic 
analysis
First 
step 
to 
Sta+c 
Analysis 
• There 
are 
some 
Linux 
commands 
that 
can 
give 
useful 
informa+on 
of 
file 
– Strings 
– Objdump 
– Hexdump 
– File
Linux 
Command 
• Strings 
– For 
each 
file 
given, 
GNU 
strings 
prints 
the 
printable 
character 
sequences 
that 
are 
at 
least 
4 
characters 
long 
and 
are 
followed 
by 
an 
unprintable 
character. 
– Get 
clues 
of 
file
Linux 
Command 
• File 
– File 
tests 
each 
argument 
in 
an 
a`empt 
to 
classify 
it. 
There 
are 
three 
sets 
of 
tests, 
performed 
in 
this 
order: 
filesystem 
tests, 
magic 
number 
tests, 
and 
language 
tests. 
The 
first 
test 
that 
succeeds 
causes 
the 
file 
type 
to 
be 
printed.
Linux 
Command 
• Hexdump 
– The 
hexdump 
u+lity 
is 
a 
filter 
which 
displays 
the 
specified 
files, 
or 
the 
standard 
input, 
if 
no 
files 
are 
specified, 
in 
a 
user 
specified 
format. 
– Hex, 
Oct, 
Char, 
…..
Linux 
Command 
• ldd 
-­‐ 
print 
shared 
library 
dependencies 
– Loading 
library 
– Loca+on 
of 
library 
file 
– Loading 
address 
of 
library
Linux 
Command 
• Objdump 
– Dump 
informa+on 
of 
ELF 
file 
– Rich 
informa+on 
can 
be 
dumped 
– Can 
used 
to 
build 
simplest 
malware 
analysis 
system
Objdump
Disassemble 
• objdump 
-­‐D
Global 
Offset 
Table 
• objdump 
–R 
– Key 
of 
sharing 
library 
in 
linux 
– GOT 
Hijack
Disassemble 
• Disassemble 
is 
a 
procedure 
to 
convert 
binary 
machine 
code 
into 
assembly 
code
Code 
Discovery 
Problem 
• In 
the 
binary 
file, 
instruc+ons 
and 
data 
may 
hybrid 
in 
the 
sec+on. 
– It 
is 
not 
easy 
to 
discover 
instruc+ons 
in 
the 
binary 
– Especial 
for 
variable-­‐length 
instruc+on 
set 
like 
x86
Linear 
sweep 
• Starts 
usually 
to 
disassemble 
from 
the 
first 
byte 
of 
the 
code 
sec+on 
in 
a 
linear 
fashion 
• Disassembles 
one 
instruc+on 
afer 
another 
un+l 
the 
end 
of 
the 
sec+on 
is 
reached 
• Do 
not 
understand 
program 
flow 
• objdump
Recursive 
traversal 
• instruc+on 
classified 
as 
– Sequen+al 
flow: 
pass 
execu+on 
to 
the 
next 
instruc+on 
that 
immediately 
follows 
– Condi+onal 
branching: 
if 
the 
condi+on 
is 
true 
the 
branch 
is 
taken 
and 
the 
instruc+on 
pointer 
must 
change 
to 
reflect 
the 
target 
of 
the 
branch, 
otherwise 
it 
con+nues 
in 
a 
linear 
fashion 
(jnz, 
jne, 
. 
. 
. 
). 
In 
sta+c 
context 
this 
algorithm 
disassemble 
both 
paths 
– Uncondi+onal 
branching: 
the 
branch 
is 
taken 
without 
any 
condi+on; 
the 
algorithm 
follows 
the 
(execu+on) 
flow 
(jmp) 
– Func+on 
call: 
are 
like 
uncondi+onal 
jumps 
but 
they 
return 
to 
the 
instruc+on 
immediately 
following 
the 
call 
– Return: 
every 
instruc+ons 
which 
may 
modify 
the 
flow 
of 
the 
program 
add 
the 
target 
address 
to 
a 
list 
of 
deferred 
disassembly. 
When 
a 
return 
instruc+on 
is 
reached 
an 
address 
is 
popped 
from 
the 
list 
and 
the 
algorithm 
con+nues 
from 
there 
(recursive 
algorithm). 
• Some 
issue 
– Indirect 
code 
invoca+ons 
– Does 
returning 
from 
a 
call 
always 
allow 
for 
a 
faithful 
disassembly
Problem 
of 
Disassembly 
• Remember 
that 
disassembler 
may 
not 
always 
true 
• Linear 
sweep 
• Recursive 
jmp 
.des+na+on 
db 
0x6a 
; 
garbage 
byte 
technique 
.des+na+on: 
pop 
eax 
traversal 
eb 
01 
jmp 
0x401003 
6a 
58 
push 
0x58 
push 
DWORD 
.des+na+on 
jmp 
DWORD 
[esp] 
db 
0x6a 
; 
garbage 
byte 
technique 
.des+na+on: 
pop 
eax 
push 
DWORD 
.des+na+on 
jmp 
DWORD 
[esp] 
push 
0x58
Reverse 
Assambly 
to 
C 
• Registers 
Architecture 
• The 
EIP 
register 
contains 
the 
address 
of 
the 
next 
instruc+on 
to 
be 
executed 
if 
no 
branching 
is 
done.
Memory 
Layout 
• Stack 
– Not 
maintain 
in 
Executable 
– Local 
Variable 
• Heap 
– Not 
maintain 
in 
Executable 
– Dynamic 
Allocate 
Memory 
• BSS 
Sec+on 
– Unini+alized 
Data 
– Global 
variables 
and 
sta+c 
variables 
that 
are 
ini+alized 
to 
zero 
or 
do 
not 
have 
explicit 
ini+aliza+on 
in 
source 
code 
• Data 
Sec+on 
– Ini+alized 
Data 
– Global 
variables 
and 
sta+c 
variables
Variables 
• 
Disassembled 
code 
for 
local 
and 
global 
variables
Local 
Variables/Arguments 
• Caller 
push 
argument 
into 
stack 
• Caller 
push 
eip 
by 
call 
instruc+on 
• Callee 
save/push 
the 
caller’s 
ebp 
• Callee 
reserve 
space 
for 
local 
variables 
– sub 
Stack 
Growing 
Direc+on
Data 
Movement 
• MOV 
dst, 
src 
– Src 
<= 
dst 
• LEA 
dst, 
src 
– Load 
effec+ve 
address 
of 
operand 
into 
specified 
register 
– To 
calculate 
the 
address 
of 
a 
variable 
which 
doesn't 
have 
a 
fixed 
address 
• Example 
– mov 
eax, 
[ebp 
-­‐ 
4] 
<= 
get 
content 
in 
[ebp 
-­‐ 
4] 
– mov 
eax, 
ebp 
– 
4 
<= 
wrong, 
no 
such 
instruc+on 
– lea 
eax, 
[ebp 
-­‐ 
4] 
<= 
get 
address 
of 
[ebp 
-­‐ 
4]
Arithme+c 
Operator 
• add 
dest, 
src 
• sub 
dest, 
src 
• mul 
arg 
• div 
– DIV 
r/m8 
– DIV 
r/m16 
– DIV 
r/m32 
• inc 
• dec
Control 
Instruc+ons 
• Flag, 
each 
instruc+on 
updates 
some 
field 
of 
flag 
for 
future 
branch 
• test 
– Performs 
a 
bit-­‐wise 
logical 
AND 
– sets 
the 
ZF(zero), 
SF(sign) 
and 
PF(parity) 
flags 
• cmp 
– Performs 
a 
comparison 
opera+on 
between 
arg1 
and 
arg2 
– Set 
SF, 
ZF, 
PF, 
CF, 
OF 
and 
AF
Branch 
Instruc+on 
• JE 
Jump 
if 
Equal 
ZF=1 
• JNE 
Jump 
if 
Not 
Equal 
ZF=0 
• JG 
Jump 
if 
Greater 
(ZF=0) 
AND 
(SF=OF) 
• JGE 
Jump 
if 
Greater 
or 
Equal 
SF=OF 
• JL 
Jump 
if 
Less 
SF≠OF 
• JLE 
Jump 
if 
Less 
or 
Equal 
(ZF=1) 
OR 
(SF≠OF)
Stack 
Opera+on 
• Stack 
is 
the 
LIFO 
data 
structure 
– PUSH: 
put 
data 
into 
top 
of 
stack 
– POP: 
get 
data 
from 
top 
of 
stack
Func+on 
Call 
• Call 
– Similar 
to 
jmp, 
but 
a 
CALL 
stores 
the 
current 
EIP 
on 
the 
stack 
• RET 
– Load 
the 
address 
in 
esp, 
and 
jump 
to 
that 
address 
• RET 
num 
– Increase 
esp 
by 
num 
– Load 
the 
address 
in 
esp, 
and 
jump 
to 
that 
address
Func+on 
Pro 
• Func+on 
Prologue 
– Store 
current 
EBP 
– Save 
ESP 
to 
current 
EBP 
– Leave 
space 
for 
local 
variables 
• Func+on 
Epilogue 
– Set 
ESP 
to 
EBP 
– Restore 
EBP
Calling 
Conven+on 
• The 
transi+on 
of 
func+on 
arguments 
must 
be 
maintain 
by 
assembly 
programmer, 
but 
most 
case 
maintain 
by 
compiler 
• Stdcall 
– func+on 
arguments 
are 
passed 
from 
right 
to 
lef 
– the 
calleé 
is 
in 
charge 
of 
cleaning 
up 
the 
stack. 
– Return 
values 
are 
stored 
in 
EAX. 
• cdecl 
– The 
cdecl 
(short 
for 
c 
declara+on) 
is 
a 
calling 
conven+on 
that 
originates 
from 
the 
C 
programming 
language 
and 
is 
used 
by 
many 
C 
compilers 
for 
the 
x86 
architecture. 
– The 
main 
difference 
of 
cdecl 
and 
stdcall 
is 
that 
in 
a 
cdecl, 
the 
caller, 
not 
the 
calleé, 
is 
responsible 
for 
cleaning 
up 
the 
stack. 
• 
pascal 
– The 
pascal 
calling 
conven+on 
origins 
from 
the 
Pascal 
programming 
language 
– The 
main 
difference 
between 
it 
and 
stdcall 
is 
that 
the 
parameters 
are 
pushed 
to 
the 
stack 
from 
lef 
to 
right. 
• fastcall 
– The 
fastcall 
is 
a 
non-­‐standardized 
calling 
conven+on. 
– the 
fastcall 
conven+on 
tends 
to 
load 
them 
into 
registers. 
This 
results 
in 
less 
memory 
interac+on 
and 
increases 
the 
performance 
of 
a 
call.
Func+on 
Call 
Structure 
• 
Func+on 
Call 
Structure 
•
Branch 
Structure 
• Branch 
Structure
Do-­‐For 
loop 
• Do-­‐For 
loop
IDA 
Pro 
• IDA 
Pro 
is 
the 
most 
well-­‐known 
dissemble/ 
decompile 
tool 
for 
reversing 
– Disassemble 
– Friendly 
GUI 
– Decopiler 
– Debugger
Overview 
Assembly 
and 
Control 
Flow 
View 
Message 
View 
Control 
Flow 
View
Func+onality(1) 
Convert 
Current 
Loca+on 
• DATA 
• Instruc+on 
• String 
• Self-­‐defined 
Data 
Structure 
• Array 
Convert 
Oprand 
• Offset 
• Hex/Oct/Dec/Bin 
• Constant 
Char 
• Segment-­‐based 
Var 
• Stack-­‐based 
Var 
• …. 
Fun 
Call 
Window 
Xref 
Table 
Graph 
Once 
The 
disassemble 
make 
mistake, 
you 
can 
fix 
it 
yourself
Func+onality(2) 
Export 
Func+on 
• List 
func+ons 
export 
to 
other 
Binary 
• DLL, 
entry 
point 
Import 
Func+on 
• Func+ons 
included 
from 
other 
files 
• Import 
func+on 
can 
help 
you 
to 
guess 
the 
behavior 
of 
program 
Names 
• Func+on 
Name 
• Variable 
Names 
• Strings 
• For 
problem 
with 
debugger 
informa+on 
inside, 
names 
can 
be 
useful 
Strings 
• All 
strings 
use 
• For 
some 
easy 
problem, 
this 
can 
help 
you 
to 
get 
flag 
• For 
other 
problem, 
it 
s+ll 
give 
you 
quick 
look 
to 
program
Useful 
Hotkeys 
Func,on 
Hotkey 
1 
Strings 
Shif+F12 
2 
Jump 
to 
operand 
Enter 
3 
Jump 
to 
previous 
posi+on 
ESC 
4 
Jump 
to 
next 
posi+on 
Ctrl+Enter 
5 
Jump 
to 
address 
G 
6 
Jump 
to 
entry 
point 
Ctrl+E 
7 
Sequence 
of 
bytes 
Alt+B 
• List 
of 
useful 
hotkeys
Prac+ce 
• Reverse 
encryp+on 
algo 
in 
bot.exe 
– sub_418f50 
– h`p://140.113.216.151/bot.exe
Decompiler 
• Decompiler 
can 
help 
you 
to 
transfer 
assembly 
into 
C 
code 
– More 
easy 
to 
read
But 
• Decompiler 
result 
is 
not 
perfect 
– Most 
of 
+me 
is 
buggy 
– Lack 
of 
source 
code 
level 
informa+on 
• May 
not 
support 
All 
playorm 
– Arm 
– X86 
– X64 
– …..
Reversing 
Concept 
• Iden+fy 
important 
part 
of 
program 
• Backward 
tracking 
user 
data 
• Forward 
tracking 
interes+ng 
API 
func+on 
• Convert 
back 
to 
C 
code
Iden+fy 
important 
part 
of 
program 
• Iden+fy 
what 
you 
interes+ng 
– Strings: 
‘flag’, 
‘key’, 
…. 
– Func+on 
to 
read 
input: 
scanf(), 
gets(),… 
– Func+on 
for 
network 
communica+on: 
recv(), 
send() 
– Read/Write 
file 
– …..
Backward 
tracking 
user 
data 
• Most 
program 
vulns 
must 
be 
trigger 
by 
user 
input 
– You 
can 
not(or 
difficult) 
a`ack 
a 
func+on 
independent 
to 
your 
input 
• Keep 
track 
about 
variables 
affected 
by 
your 
input 
– Data 
Propagate 
• Data 
Dependency
Forward 
tracking 
interes+ng 
API 
func+on 
• Most 
vulns 
are 
cause 
by 
some 
certain 
func+ons 
– strcpy() 
– memcpy() 
– scanf() 
– priny() 
– strcat() 
– ….. 
• Try 
to 
trigger 
these 
func+ons 
• Analysis 
control 
flow 
and 
make 
strategy 
to 
enforce 
program 
goto 
these 
func+ons
Convert 
back 
to 
C 
code 
1. Gather 
informa+on 
– IAT 
– Strings 
– Dynamic 
analysis 
2. Iden+fy 
func+on 
of 
interest 
3. Iden+fy 
CALLs 
4. Iden+fy 
algorithms 
and 
data 
structures 
5. Pseudo-­‐code 
it! 
6. Rename 
func+on(s), 
argument(s), 
variable(s)
Problem 
of 
sta+c 
analysis 
• Encryp+on/Self 
Modified 
Code 
• Lack 
of 
run+me 
informa+on 
• Take 
a 
lot 
of 
+me 
to 
understand 
program 
L
Advantage 
• Why 
we 
s+ll 
needed 
sta+c 
analysis? 
– Give 
you 
very 
first 
concept 
of 
program 
– Overview 
of 
program 
flow 
– Hybrid 
with 
dynamic 
analysis
Summary 
• This 
course 
brings 
the 
basic 
idea 
of 
sta+c 
analysis 
• Intro. 
some 
tool 
for 
sta+c 
analysis 
• Basic 
ASM 
• How 
to 
reverse 
asm 
to 
c 
– Func+on 
call 
– Memory 
• Some 
+ps 
for 
sta+c 
analysis
Q&A

More Related Content

What's hot

CNIT 127 Ch 8: Windows overflows (Part 1)
CNIT 127 Ch 8: Windows overflows (Part 1)CNIT 127 Ch 8: Windows overflows (Part 1)
CNIT 127 Ch 8: Windows overflows (Part 1)
Sam Bowne
 
Return oriented programming (ROP)
Return oriented programming (ROP)Return oriented programming (ROP)
Return oriented programming (ROP)
Pipat Methavanitpong
 
27.2.10 lab extract an executable from a pcap
27.2.10 lab   extract an executable from a pcap27.2.10 lab   extract an executable from a pcap
27.2.10 lab extract an executable from a pcap
Freddy Buenaño
 
SDAccel Design Contest: Vivado HLS
SDAccel Design Contest: Vivado HLSSDAccel Design Contest: Vivado HLS
SDAccel Design Contest: Vivado HLS
NECST Lab @ Politecnico di Milano
 
Kernel Recipes 2013 - Nftables, what motivations and what solutions
Kernel Recipes 2013 - Nftables, what motivations and what solutionsKernel Recipes 2013 - Nftables, what motivations and what solutions
Kernel Recipes 2013 - Nftables, what motivations and what solutions
Anne Nicolas
 
DSD-INT 2014 - Delft3D Open Source Workshop - Qinghua Ye & Adri Mourits, Delt...
DSD-INT 2014 - Delft3D Open Source Workshop - Qinghua Ye & Adri Mourits, Delt...DSD-INT 2014 - Delft3D Open Source Workshop - Qinghua Ye & Adri Mourits, Delt...
DSD-INT 2014 - Delft3D Open Source Workshop - Qinghua Ye & Adri Mourits, Delt...
Deltares
 
SDAccel Design Contest: Xilinx SDAccel
SDAccel Design Contest: Xilinx SDAccel SDAccel Design Contest: Xilinx SDAccel
SDAccel Design Contest: Xilinx SDAccel
NECST Lab @ Politecnico di Milano
 
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
Mark West
 
FBTFTP: an opensource framework to build dynamic tftp servers
FBTFTP: an opensource framework to build dynamic tftp serversFBTFTP: an opensource framework to build dynamic tftp servers
FBTFTP: an opensource framework to build dynamic tftp servers
Angelo Failla
 
PLNOG 18 - Paweł Małachowski - Spy hard czyli regexpem po pakietach
PLNOG 18 - Paweł Małachowski - Spy hard czyli regexpem po pakietachPLNOG 18 - Paweł Małachowski - Spy hard czyli regexpem po pakietach
PLNOG 18 - Paweł Małachowski - Spy hard czyli regexpem po pakietach
PROIDEA
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecture
hugo lu
 
KARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live PatchingKARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live Patching
Yue Chen
 
Serialization in Go
Serialization in GoSerialization in Go
Serialization in Go
Albert Strasheim
 
SDAccel Design Contest: Intro
SDAccel Design Contest: IntroSDAccel Design Contest: Intro
SDAccel Design Contest: Intro
NECST Lab @ Politecnico di Milano
 
SDAccel Design Contest: Vivado
SDAccel Design Contest: VivadoSDAccel Design Contest: Vivado
SDAccel Design Contest: Vivado
NECST Lab @ Politecnico di Milano
 
27.1.5 lab convert data into a universal format
27.1.5 lab   convert data into a universal format27.1.5 lab   convert data into a universal format
27.1.5 lab convert data into a universal format
Freddy Buenaño
 
Docker at and with SignalFx
Docker at and with SignalFxDocker at and with SignalFx
Docker at and with SignalFx
SignalFx
 
One Shellcode to Rule Them All: Cross-Platform Exploitation
One Shellcode to Rule Them All: Cross-Platform ExploitationOne Shellcode to Rule Them All: Cross-Platform Exploitation
One Shellcode to Rule Them All: Cross-Platform Exploitation
Quinn Wilton
 
Wireshark
WiresharkWireshark
Wireshark
btohara
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
DECK36
 

What's hot (20)

CNIT 127 Ch 8: Windows overflows (Part 1)
CNIT 127 Ch 8: Windows overflows (Part 1)CNIT 127 Ch 8: Windows overflows (Part 1)
CNIT 127 Ch 8: Windows overflows (Part 1)
 
Return oriented programming (ROP)
Return oriented programming (ROP)Return oriented programming (ROP)
Return oriented programming (ROP)
 
27.2.10 lab extract an executable from a pcap
27.2.10 lab   extract an executable from a pcap27.2.10 lab   extract an executable from a pcap
27.2.10 lab extract an executable from a pcap
 
SDAccel Design Contest: Vivado HLS
SDAccel Design Contest: Vivado HLSSDAccel Design Contest: Vivado HLS
SDAccel Design Contest: Vivado HLS
 
Kernel Recipes 2013 - Nftables, what motivations and what solutions
Kernel Recipes 2013 - Nftables, what motivations and what solutionsKernel Recipes 2013 - Nftables, what motivations and what solutions
Kernel Recipes 2013 - Nftables, what motivations and what solutions
 
DSD-INT 2014 - Delft3D Open Source Workshop - Qinghua Ye & Adri Mourits, Delt...
DSD-INT 2014 - Delft3D Open Source Workshop - Qinghua Ye & Adri Mourits, Delt...DSD-INT 2014 - Delft3D Open Source Workshop - Qinghua Ye & Adri Mourits, Delt...
DSD-INT 2014 - Delft3D Open Source Workshop - Qinghua Ye & Adri Mourits, Delt...
 
SDAccel Design Contest: Xilinx SDAccel
SDAccel Design Contest: Xilinx SDAccel SDAccel Design Contest: Xilinx SDAccel
SDAccel Design Contest: Xilinx SDAccel
 
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
 
FBTFTP: an opensource framework to build dynamic tftp servers
FBTFTP: an opensource framework to build dynamic tftp serversFBTFTP: an opensource framework to build dynamic tftp servers
FBTFTP: an opensource framework to build dynamic tftp servers
 
PLNOG 18 - Paweł Małachowski - Spy hard czyli regexpem po pakietach
PLNOG 18 - Paweł Małachowski - Spy hard czyli regexpem po pakietachPLNOG 18 - Paweł Małachowski - Spy hard czyli regexpem po pakietach
PLNOG 18 - Paweł Małachowski - Spy hard czyli regexpem po pakietach
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecture
 
KARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live PatchingKARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live Patching
 
Serialization in Go
Serialization in GoSerialization in Go
Serialization in Go
 
SDAccel Design Contest: Intro
SDAccel Design Contest: IntroSDAccel Design Contest: Intro
SDAccel Design Contest: Intro
 
SDAccel Design Contest: Vivado
SDAccel Design Contest: VivadoSDAccel Design Contest: Vivado
SDAccel Design Contest: Vivado
 
27.1.5 lab convert data into a universal format
27.1.5 lab   convert data into a universal format27.1.5 lab   convert data into a universal format
27.1.5 lab convert data into a universal format
 
Docker at and with SignalFx
Docker at and with SignalFxDocker at and with SignalFx
Docker at and with SignalFx
 
One Shellcode to Rule Them All: Cross-Platform Exploitation
One Shellcode to Rule Them All: Cross-Platform ExploitationOne Shellcode to Rule Them All: Cross-Platform Exploitation
One Shellcode to Rule Them All: Cross-Platform Exploitation
 
Wireshark
WiresharkWireshark
Wireshark
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
 

Viewers also liked

Security events in 2014
Security events in 2014Security events in 2014
Security events in 2014
Chong-Kuan Chen
 
Addios!
Addios!Addios!
Mem forensic
Mem forensicMem forensic
Mem forensic
Chong-Kuan Chen
 
Inside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware AnalysisInside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Chong-Kuan Chen
 
Become A Security Master
Become A Security MasterBecome A Security Master
Become A Security Master
Chong-Kuan Chen
 
Android Application Security
Android Application SecurityAndroid Application Security
Android Application Security
Chong-Kuan Chen
 
HITCON CTF 2014 BambooFox 解題心得分享
HITCON CTF 2014 BambooFox 解題心得分享HITCON CTF 2014 BambooFox 解題心得分享
HITCON CTF 2014 BambooFox 解題心得分享
Chong-Kuan Chen
 
Android system security
Android system securityAndroid system security
Android system security
Chong-Kuan Chen
 
Compilation and Execution
Compilation and ExecutionCompilation and Execution
Compilation and Execution
Chong-Kuan Chen
 
Malware Detection - A Machine Learning Perspective
Malware Detection - A Machine Learning PerspectiveMalware Detection - A Machine Learning Perspective
Malware Detection - A Machine Learning Perspective
Chong-Kuan Chen
 
網頁安全 Web security 入門 @ Study-Area
網頁安全 Web security 入門 @ Study-Area網頁安全 Web security 入門 @ Study-Area
網頁安全 Web security 入門 @ Study-Area
Orange Tsai
 

Viewers also liked (11)

Security events in 2014
Security events in 2014Security events in 2014
Security events in 2014
 
Addios!
Addios!Addios!
Addios!
 
Mem forensic
Mem forensicMem forensic
Mem forensic
 
Inside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware AnalysisInside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware Analysis
 
Become A Security Master
Become A Security MasterBecome A Security Master
Become A Security Master
 
Android Application Security
Android Application SecurityAndroid Application Security
Android Application Security
 
HITCON CTF 2014 BambooFox 解題心得分享
HITCON CTF 2014 BambooFox 解題心得分享HITCON CTF 2014 BambooFox 解題心得分享
HITCON CTF 2014 BambooFox 解題心得分享
 
Android system security
Android system securityAndroid system security
Android system security
 
Compilation and Execution
Compilation and ExecutionCompilation and Execution
Compilation and Execution
 
Malware Detection - A Machine Learning Perspective
Malware Detection - A Machine Learning PerspectiveMalware Detection - A Machine Learning Perspective
Malware Detection - A Machine Learning Perspective
 
網頁安全 Web security 入門 @ Study-Area
網頁安全 Web security 入門 @ Study-Area網頁安全 Web security 入門 @ Study-Area
網頁安全 Web security 入門 @ Study-Area
 

Similar to Intro. to static analysis

CNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on LinuxCNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on Linux
Sam Bowne
 
CNIT 127: Ch 2: Stack Overflows in Linux
CNIT 127: Ch 2: Stack Overflows in LinuxCNIT 127: Ch 2: Stack Overflows in Linux
CNIT 127: Ch 2: Stack Overflows in Linux
Sam Bowne
 
127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux
Sam Bowne
 
127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux
Sam Bowne
 
CNIT 127: Ch 2: Stack overflows on Linux
CNIT 127: Ch 2: Stack overflows on LinuxCNIT 127: Ch 2: Stack overflows on Linux
CNIT 127: Ch 2: Stack overflows on Linux
Sam Bowne
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old Secrets
Brendan Gregg
 
Максим Харченко. Erlang lincx
Максим Харченко. Erlang lincxМаксим Харченко. Erlang lincx
Максим Харченко. Erlang lincx
Alina Dolgikh
 
0.5mln packets per second with Erlang
0.5mln packets per second with Erlang0.5mln packets per second with Erlang
0.5mln packets per second with Erlang
Maxim Kharchenko
 
Lecture 15 run timeenvironment_2
Lecture 15 run timeenvironment_2Lecture 15 run timeenvironment_2
Lecture 15 run timeenvironment_2
Iffat Anjum
 
CNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on LinuxCNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on Linux
Sam Bowne
 
Efficient Bytecode Analysis: Linespeed Shellcode Detection
Efficient Bytecode Analysis: Linespeed Shellcode DetectionEfficient Bytecode Analysis: Linespeed Shellcode Detection
Efficient Bytecode Analysis: Linespeed Shellcode Detection
Georg Wicherski
 
CNIT 127 Ch 1: Before you Begin
CNIT 127 Ch 1: Before you BeginCNIT 127 Ch 1: Before you Begin
CNIT 127 Ch 1: Before you Begin
Sam Bowne
 
CNIT 127 Ch Ch 1: Before you Begin
CNIT 127 Ch Ch 1: Before you BeginCNIT 127 Ch Ch 1: Before you Begin
CNIT 127 Ch Ch 1: Before you Begin
Sam Bowne
 
The joy of functional programming
The joy of functional programmingThe joy of functional programming
The joy of functional programming
Steve Zhang
 
Python高级编程(二)
Python高级编程(二)Python高级编程(二)
Python高级编程(二)
Qiangning Hong
 
Functional Programming in Javascript - IL Tech Talks week
Functional Programming in Javascript - IL Tech Talks weekFunctional Programming in Javascript - IL Tech Talks week
Functional Programming in Javascript - IL Tech Talks week
yoavrubin
 
Jvm memory model
Jvm memory modelJvm memory model
Jvm memory model
Yoav Avrahami
 
Instrumentation & the Pitfalls of Abstraction
Instrumentation & the Pitfalls of AbstractionInstrumentation & the Pitfalls of Abstraction
Instrumentation & the Pitfalls of Abstraction
ESUG
 
C language
C languageC language
C language
Robo India
 
Scaling ingest pipelines with high performance computing principles - Rajiv K...
Scaling ingest pipelines with high performance computing principles - Rajiv K...Scaling ingest pipelines with high performance computing principles - Rajiv K...
Scaling ingest pipelines with high performance computing principles - Rajiv K...
SignalFx
 

Similar to Intro. to static analysis (20)

CNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on LinuxCNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on Linux
 
CNIT 127: Ch 2: Stack Overflows in Linux
CNIT 127: Ch 2: Stack Overflows in LinuxCNIT 127: Ch 2: Stack Overflows in Linux
CNIT 127: Ch 2: Stack Overflows in Linux
 
127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux
 
127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux
 
CNIT 127: Ch 2: Stack overflows on Linux
CNIT 127: Ch 2: Stack overflows on LinuxCNIT 127: Ch 2: Stack overflows on Linux
CNIT 127: Ch 2: Stack overflows on Linux
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old Secrets
 
Максим Харченко. Erlang lincx
Максим Харченко. Erlang lincxМаксим Харченко. Erlang lincx
Максим Харченко. Erlang lincx
 
0.5mln packets per second with Erlang
0.5mln packets per second with Erlang0.5mln packets per second with Erlang
0.5mln packets per second with Erlang
 
Lecture 15 run timeenvironment_2
Lecture 15 run timeenvironment_2Lecture 15 run timeenvironment_2
Lecture 15 run timeenvironment_2
 
CNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on LinuxCNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on Linux
 
Efficient Bytecode Analysis: Linespeed Shellcode Detection
Efficient Bytecode Analysis: Linespeed Shellcode DetectionEfficient Bytecode Analysis: Linespeed Shellcode Detection
Efficient Bytecode Analysis: Linespeed Shellcode Detection
 
CNIT 127 Ch 1: Before you Begin
CNIT 127 Ch 1: Before you BeginCNIT 127 Ch 1: Before you Begin
CNIT 127 Ch 1: Before you Begin
 
CNIT 127 Ch Ch 1: Before you Begin
CNIT 127 Ch Ch 1: Before you BeginCNIT 127 Ch Ch 1: Before you Begin
CNIT 127 Ch Ch 1: Before you Begin
 
The joy of functional programming
The joy of functional programmingThe joy of functional programming
The joy of functional programming
 
Python高级编程(二)
Python高级编程(二)Python高级编程(二)
Python高级编程(二)
 
Functional Programming in Javascript - IL Tech Talks week
Functional Programming in Javascript - IL Tech Talks weekFunctional Programming in Javascript - IL Tech Talks week
Functional Programming in Javascript - IL Tech Talks week
 
Jvm memory model
Jvm memory modelJvm memory model
Jvm memory model
 
Instrumentation & the Pitfalls of Abstraction
Instrumentation & the Pitfalls of AbstractionInstrumentation & the Pitfalls of Abstraction
Instrumentation & the Pitfalls of Abstraction
 
C language
C languageC language
C language
 
Scaling ingest pipelines with high performance computing principles - Rajiv K...
Scaling ingest pipelines with high performance computing principles - Rajiv K...Scaling ingest pipelines with high performance computing principles - Rajiv K...
Scaling ingest pipelines with high performance computing principles - Rajiv K...
 

Recently uploaded

Principles of Electronic Communication System 4th Edition by Louis Frenzel.pdf
Principles of Electronic Communication System 4th Edition by Louis Frenzel.pdfPrinciples of Electronic Communication System 4th Edition by Louis Frenzel.pdf
Principles of Electronic Communication System 4th Edition by Louis Frenzel.pdf
AeronKimAbel
 
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
hahehot
 
Research Experience during my undergraduate study.pptx
Research Experience during my undergraduate study.pptxResearch Experience during my undergraduate study.pptx
Research Experience during my undergraduate study.pptx
gxz1691543945
 
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulationCS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
amrashbhanuabdul
 
How to Manage Internal Notes in Odoo 17 POS
How to Manage Internal Notes in Odoo 17 POSHow to Manage Internal Notes in Odoo 17 POS
How to Manage Internal Notes in Odoo 17 POS
Celine George
 
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE DonatoCONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
Servizi a rete
 
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdfOCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
Muanisa Waras
 
Best Practices for Password Rotation and Tools to Streamline the Process
Best Practices for Password Rotation and Tools to Streamline the ProcessBest Practices for Password Rotation and Tools to Streamline the Process
Best Practices for Password Rotation and Tools to Streamline the Process
Bert Blevins
 
Germany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptxGermany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptx
rebecca841358
 
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
VICTOR MAESTRE RAMIREZ
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
naseki5964
 
PCA-solved problems.pptx helpful for ml .
PCA-solved problems.pptx helpful for ml .PCA-solved problems.pptx helpful for ml .
PCA-solved problems.pptx helpful for ml .
Sravani477269
 
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and PreventionUnderstanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Bert Blevins
 
kiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinkerkiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinker
hamedmustafa094
 
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
IJAEMSJORNAL
 
FD FAN.pdf forced draft fan for boiler operation and run its very important f...
FD FAN.pdf forced draft fan for boiler operation and run its very important f...FD FAN.pdf forced draft fan for boiler operation and run its very important f...
FD FAN.pdf forced draft fan for boiler operation and run its very important f...
MDHabiburRhaman1
 
South Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
South Mumbai @Call @Girls Whatsapp 9930687706 With High Profile ServiceSouth Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
South Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
kolkata dolls
 
Use of Multimedia tag in HTML using exmples
Use of Multimedia tag in HTML using exmplesUse of Multimedia tag in HTML using exmples
Use of Multimedia tag in HTML using exmples
ssuser08ea44
 
this slide shows husien hanafy portfolio 6-2024
this slide shows husien hanafy portfolio 6-2024this slide shows husien hanafy portfolio 6-2024
this slide shows husien hanafy portfolio 6-2024
hessenhanafy1
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

Principles of Electronic Communication System 4th Edition by Louis Frenzel.pdf
Principles of Electronic Communication System 4th Edition by Louis Frenzel.pdfPrinciples of Electronic Communication System 4th Edition by Louis Frenzel.pdf
Principles of Electronic Communication System 4th Edition by Louis Frenzel.pdf
 
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
 
Research Experience during my undergraduate study.pptx
Research Experience during my undergraduate study.pptxResearch Experience during my undergraduate study.pptx
Research Experience during my undergraduate study.pptx
 
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulationCS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
 
How to Manage Internal Notes in Odoo 17 POS
How to Manage Internal Notes in Odoo 17 POSHow to Manage Internal Notes in Odoo 17 POS
How to Manage Internal Notes in Odoo 17 POS
 
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE DonatoCONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
 
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdfOCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
 
Best Practices for Password Rotation and Tools to Streamline the Process
Best Practices for Password Rotation and Tools to Streamline the ProcessBest Practices for Password Rotation and Tools to Streamline the Process
Best Practices for Password Rotation and Tools to Streamline the Process
 
Germany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptxGermany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptx
 
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
 
PCA-solved problems.pptx helpful for ml .
PCA-solved problems.pptx helpful for ml .PCA-solved problems.pptx helpful for ml .
PCA-solved problems.pptx helpful for ml .
 
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and PreventionUnderstanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
 
kiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinkerkiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinker
 
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
 
FD FAN.pdf forced draft fan for boiler operation and run its very important f...
FD FAN.pdf forced draft fan for boiler operation and run its very important f...FD FAN.pdf forced draft fan for boiler operation and run its very important f...
FD FAN.pdf forced draft fan for boiler operation and run its very important f...
 
South Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
South Mumbai @Call @Girls Whatsapp 9930687706 With High Profile ServiceSouth Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
South Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
 
Use of Multimedia tag in HTML using exmples
Use of Multimedia tag in HTML using exmplesUse of Multimedia tag in HTML using exmples
Use of Multimedia tag in HTML using exmples
 
this slide shows husien hanafy portfolio 6-2024
this slide shows husien hanafy portfolio 6-2024this slide shows husien hanafy portfolio 6-2024
this slide shows husien hanafy portfolio 6-2024
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
 

Intro. to static analysis

  • 1. Intro. To Sta+c Analysis C.K. Chen 2014.09.27
  • 2. Who am I • C.K Chen (陳仲寬) – P.H.D Student in DSNS Lab, NCTU – BambooFox CTF – Research in • Reverse Engineering • Malware Analysis • Virtual Machine • About this work – CHI-­‐WEI WANG, CHIA-­‐WEI WANG, CHONG-­‐KUAN CHEN 2
  • 3. About DSNS • 謝續平教授 • 實驗室研究方向 – 惡意程式分析 – 虛擬機器 – 數位鑑識 – 網路安全 3
  • 4. Outline • Intro. To Sta+c Analysis • Common Tools inLinux for Sta+c Analysis • Disassemble • Reverse Assambly to C – Fundamental ASM • IDA Pro – Prace+ce • Tips for Sta+c Analtsis
  • 5. Intr. to Sta+c Analysis • Sta+c analysis – Analysis malware without execu+on • Dynamic analysis – Execute malware inside controllable environment and monitor it’s behavior
  • 6. Informa+on from Sta+c Analysis • What informa+on we can get from sta+c analysis
  • 7. Informa+on from Sta+c Analysis • What informa+on we can get from sta+c analysis – File Structure – Binary Code – Related Module – Suspicious String
  • 8. Informa+on from Sta+c Analysis • What we cannot get? – Register Value – Memory Value – Packed Code – Encrypted Message
  • 9. Usage of sta+c analysis • In normal case, there are some problems that sta+c analysis is involved – Reverse: Windows, Linux – Pwned(Exploit): Linux, Windows(rare) • Complement to the dynamic analysis
  • 10. First step to Sta+c Analysis • There are some Linux commands that can give useful informa+on of file – Strings – Objdump – Hexdump – File
  • 11. Linux Command • Strings – For each file given, GNU strings prints the printable character sequences that are at least 4 characters long and are followed by an unprintable character. – Get clues of file
  • 12. Linux Command • File – File tests each argument in an a`empt to classify it. There are three sets of tests, performed in this order: filesystem tests, magic number tests, and language tests. The first test that succeeds causes the file type to be printed.
  • 13. Linux Command • Hexdump – The hexdump u+lity is a filter which displays the specified files, or the standard input, if no files are specified, in a user specified format. – Hex, Oct, Char, …..
  • 14. Linux Command • ldd -­‐ print shared library dependencies – Loading library – Loca+on of library file – Loading address of library
  • 15. Linux Command • Objdump – Dump informa+on of ELF file – Rich informa+on can be dumped – Can used to build simplest malware analysis system
  • 18. Global Offset Table • objdump –R – Key of sharing library in linux – GOT Hijack
  • 19. Disassemble • Disassemble is a procedure to convert binary machine code into assembly code
  • 20. Code Discovery Problem • In the binary file, instruc+ons and data may hybrid in the sec+on. – It is not easy to discover instruc+ons in the binary – Especial for variable-­‐length instruc+on set like x86
  • 21. Linear sweep • Starts usually to disassemble from the first byte of the code sec+on in a linear fashion • Disassembles one instruc+on afer another un+l the end of the sec+on is reached • Do not understand program flow • objdump
  • 22. Recursive traversal • instruc+on classified as – Sequen+al flow: pass execu+on to the next instruc+on that immediately follows – Condi+onal branching: if the condi+on is true the branch is taken and the instruc+on pointer must change to reflect the target of the branch, otherwise it con+nues in a linear fashion (jnz, jne, . . . ). In sta+c context this algorithm disassemble both paths – Uncondi+onal branching: the branch is taken without any condi+on; the algorithm follows the (execu+on) flow (jmp) – Func+on call: are like uncondi+onal jumps but they return to the instruc+on immediately following the call – Return: every instruc+ons which may modify the flow of the program add the target address to a list of deferred disassembly. When a return instruc+on is reached an address is popped from the list and the algorithm con+nues from there (recursive algorithm). • Some issue – Indirect code invoca+ons – Does returning from a call always allow for a faithful disassembly
  • 23. Problem of Disassembly • Remember that disassembler may not always true • Linear sweep • Recursive jmp .des+na+on db 0x6a ; garbage byte technique .des+na+on: pop eax traversal eb 01 jmp 0x401003 6a 58 push 0x58 push DWORD .des+na+on jmp DWORD [esp] db 0x6a ; garbage byte technique .des+na+on: pop eax push DWORD .des+na+on jmp DWORD [esp] push 0x58
  • 24. Reverse Assambly to C • Registers Architecture • The EIP register contains the address of the next instruc+on to be executed if no branching is done.
  • 25. Memory Layout • Stack – Not maintain in Executable – Local Variable • Heap – Not maintain in Executable – Dynamic Allocate Memory • BSS Sec+on – Unini+alized Data – Global variables and sta+c variables that are ini+alized to zero or do not have explicit ini+aliza+on in source code • Data Sec+on – Ini+alized Data – Global variables and sta+c variables
  • 26. Variables • Disassembled code for local and global variables
  • 27. Local Variables/Arguments • Caller push argument into stack • Caller push eip by call instruc+on • Callee save/push the caller’s ebp • Callee reserve space for local variables – sub Stack Growing Direc+on
  • 28. Data Movement • MOV dst, src – Src <= dst • LEA dst, src – Load effec+ve address of operand into specified register – To calculate the address of a variable which doesn't have a fixed address • Example – mov eax, [ebp -­‐ 4] <= get content in [ebp -­‐ 4] – mov eax, ebp – 4 <= wrong, no such instruc+on – lea eax, [ebp -­‐ 4] <= get address of [ebp -­‐ 4]
  • 29. Arithme+c Operator • add dest, src • sub dest, src • mul arg • div – DIV r/m8 – DIV r/m16 – DIV r/m32 • inc • dec
  • 30. Control Instruc+ons • Flag, each instruc+on updates some field of flag for future branch • test – Performs a bit-­‐wise logical AND – sets the ZF(zero), SF(sign) and PF(parity) flags • cmp – Performs a comparison opera+on between arg1 and arg2 – Set SF, ZF, PF, CF, OF and AF
  • 31. Branch Instruc+on • JE Jump if Equal ZF=1 • JNE Jump if Not Equal ZF=0 • JG Jump if Greater (ZF=0) AND (SF=OF) • JGE Jump if Greater or Equal SF=OF • JL Jump if Less SF≠OF • JLE Jump if Less or Equal (ZF=1) OR (SF≠OF)
  • 32. Stack Opera+on • Stack is the LIFO data structure – PUSH: put data into top of stack – POP: get data from top of stack
  • 33. Func+on Call • Call – Similar to jmp, but a CALL stores the current EIP on the stack • RET – Load the address in esp, and jump to that address • RET num – Increase esp by num – Load the address in esp, and jump to that address
  • 34. Func+on Pro • Func+on Prologue – Store current EBP – Save ESP to current EBP – Leave space for local variables • Func+on Epilogue – Set ESP to EBP – Restore EBP
  • 35. Calling Conven+on • The transi+on of func+on arguments must be maintain by assembly programmer, but most case maintain by compiler • Stdcall – func+on arguments are passed from right to lef – the calleé is in charge of cleaning up the stack. – Return values are stored in EAX. • cdecl – The cdecl (short for c declara+on) is a calling conven+on that originates from the C programming language and is used by many C compilers for the x86 architecture. – The main difference of cdecl and stdcall is that in a cdecl, the caller, not the calleé, is responsible for cleaning up the stack. • pascal – The pascal calling conven+on origins from the Pascal programming language – The main difference between it and stdcall is that the parameters are pushed to the stack from lef to right. • fastcall – The fastcall is a non-­‐standardized calling conven+on. – the fastcall conven+on tends to load them into registers. This results in less memory interac+on and increases the performance of a call.
  • 36. Func+on Call Structure • Func+on Call Structure •
  • 37. Branch Structure • Branch Structure
  • 38. Do-­‐For loop • Do-­‐For loop
  • 39. IDA Pro • IDA Pro is the most well-­‐known dissemble/ decompile tool for reversing – Disassemble – Friendly GUI – Decopiler – Debugger
  • 40. Overview Assembly and Control Flow View Message View Control Flow View
  • 41. Func+onality(1) Convert Current Loca+on • DATA • Instruc+on • String • Self-­‐defined Data Structure • Array Convert Oprand • Offset • Hex/Oct/Dec/Bin • Constant Char • Segment-­‐based Var • Stack-­‐based Var • …. Fun Call Window Xref Table Graph Once The disassemble make mistake, you can fix it yourself
  • 42. Func+onality(2) Export Func+on • List func+ons export to other Binary • DLL, entry point Import Func+on • Func+ons included from other files • Import func+on can help you to guess the behavior of program Names • Func+on Name • Variable Names • Strings • For problem with debugger informa+on inside, names can be useful Strings • All strings use • For some easy problem, this can help you to get flag • For other problem, it s+ll give you quick look to program
  • 43. Useful Hotkeys Func,on Hotkey 1 Strings Shif+F12 2 Jump to operand Enter 3 Jump to previous posi+on ESC 4 Jump to next posi+on Ctrl+Enter 5 Jump to address G 6 Jump to entry point Ctrl+E 7 Sequence of bytes Alt+B • List of useful hotkeys
  • 44. Prac+ce • Reverse encryp+on algo in bot.exe – sub_418f50 – h`p://140.113.216.151/bot.exe
  • 45. Decompiler • Decompiler can help you to transfer assembly into C code – More easy to read
  • 46. But • Decompiler result is not perfect – Most of +me is buggy – Lack of source code level informa+on • May not support All playorm – Arm – X86 – X64 – …..
  • 47. Reversing Concept • Iden+fy important part of program • Backward tracking user data • Forward tracking interes+ng API func+on • Convert back to C code
  • 48. Iden+fy important part of program • Iden+fy what you interes+ng – Strings: ‘flag’, ‘key’, …. – Func+on to read input: scanf(), gets(),… – Func+on for network communica+on: recv(), send() – Read/Write file – …..
  • 49. Backward tracking user data • Most program vulns must be trigger by user input – You can not(or difficult) a`ack a func+on independent to your input • Keep track about variables affected by your input – Data Propagate • Data Dependency
  • 50. Forward tracking interes+ng API func+on • Most vulns are cause by some certain func+ons – strcpy() – memcpy() – scanf() – priny() – strcat() – ….. • Try to trigger these func+ons • Analysis control flow and make strategy to enforce program goto these func+ons
  • 51. Convert back to C code 1. Gather informa+on – IAT – Strings – Dynamic analysis 2. Iden+fy func+on of interest 3. Iden+fy CALLs 4. Iden+fy algorithms and data structures 5. Pseudo-­‐code it! 6. Rename func+on(s), argument(s), variable(s)
  • 52. Problem of sta+c analysis • Encryp+on/Self Modified Code • Lack of run+me informa+on • Take a lot of +me to understand program L
  • 53. Advantage • Why we s+ll needed sta+c analysis? – Give you very first concept of program – Overview of program flow – Hybrid with dynamic analysis
  • 54. Summary • This course brings the basic idea of sta+c analysis • Intro. some tool for sta+c analysis • Basic ASM • How to reverse asm to c – Func+on call – Memory • Some +ps for sta+c analysis
  • 55. Q&A