Upload
hacks-in-taiwan-hitcon
View
17.306
Download
2
Embed Size (px)
Citation preview
⼈人 友 增⼀一⼈人 友 &Turkey
Outline• HITCON GIRLS 想
• ⼈人
• ⼒力 種了於
•
• ⼈人 友 ⼼心
• 這到 友 增⼀一
•
HITCON GIRLS 想
• HITCON GIRLS
• 想 對
•
• 起 於 啊⼈人 友 給 Malware 到 ⼼心於會 起
HITCON GIRLS 想
Web PT
Android PT
來要
����#�
⼈人����# CTF
� ⼈人 Flag Key��
於會機之 ⼈人於 Flag
��
�!�� Code ⼼心 ⾏行時 CTF
�� 就 不 Write Up
⼈人
⼈人(Malware)• 很
• 意不 個 ⼈人
• 明 想 於開 可於 才
•
• 於事 三⼩小於 過 都
• 上 覺 可想⽤用
• 被你後 明 想
⼈人
Grayware
• Grayware ⼼心 每 ⼈人
• 出⼈人
•
• 動
• 裡 間 間 ⼿手
增⼀一
看 於 種了• 看
• &
• 到 友&這到 友
•
• 會
• 點
• Registry Key
• 做
• Process
• API
• 有為
⼈人 友• 友
• 學 ⼈人 樣⾃自
• Snapshot
• 地以 友
• 下
• 間 全我 ⼈人 ⼼心 知給 於 於過 於⾼高⼩小
• 可 給 麼
• 快 能 ⼼心
• Registry Key - AutoRuns
• Process - Process Explorer / Process Monitor
• Network - TCPView / TCPLogView / WireShark
• File system - AutoRuns / Process Explorer
• 快 能 ⼼心
• Registry Key - AutoRuns
• Process - Process Explorer / Process Monitor
• Network - TCPView / TCPLogView / WireShark
• File system - AutoRuns / Process Explorer
- Registry• Registry 著 ⽽而更
• 可 ⼈人 都 想
• C:\Windows\regedit.exe
- 做
• ⼈人 做 ⼈人 想他不 做
• Registry 是 做
• HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
- Registry Key
• ⼈人 可都 可 Registry Key 新
• ⼈人在 發做 Registry 下 做 做
• 快 能 ⼼心
• Registry Key - AutoRuns
• Process - Process Explorer / Process Monitor
• Network - TCPView / TCPLogView / WireShark
• File system - AutoRuns / Process Explorer
- Process• ⼈人 → 家 → 成
• 成 (process) ⼈人
- Process• ⼈人 ⼈人
• 吃 想
• 多 ⼈人
然說
- • 過 做 HKLM\…\CurrentVersion\Run
• Process Injection
• 可想
• IP DNS
• ⾼高⼩小
⼈人 友 ⼼心• Behavior Tool
• Autoruns
• Process Monitor / Process Explorer
• TCPView / TCPLogView /WireShark
• Online Sandbox
• Virustotal
• Comodo
• ���� Sandbox
• CaptureBat
• Cuckoo
友 ⼼心 - AutoRuns• ⼥女要 Registry Key 真 於過
友 ⼼心 - ProcessExplorer • ⼥女之 家 成能
• 的
• ⼤大 到 ⼈人 (DLL) 於
友 ⼼心 - TCPView• 於 天 ⼈人⾃自
友 ⼼心 - SandBox 裡
• 說⼈人 什 感
• ⽤用 於⼼心開⼈人 ⼈人 什 們
Sandbox 3 ſƹľŏ D!��Rǘ
友 ⼼心 - VirusTotal
友 ⼼心 - CaptureBAT
• 間 間 ⼼心
•
想(��%�) Digital Forensics
• 如 ⼥女要
(���"�) Malware Detection
• 只⼜又 三 ⼥女們
($� �) Reversing Engineering
• 於 次 會 讓 第
AllenOwn 什
想(��%�) Digital Forensics
• 如 ⼥女要
(���"�) Malware Detection
• 只⼜又 三 ⼥女們
($� �) Reversing Engineering
• 於 次 會 讓 第
想(��%�) Digital Forensics
• 如 ⼥女要
(���"�) Malware Detection
• 只⼜又 三 ⼥女們
($� �) Reversing Engineering
• 於 次 會 讓 第
想(��%�) Digital Forensics
• 如 ⼥女要
(���"�) Malware Detection
• 只⼜又 三 ⼥女們
($� �) Reversing Engineering
• 於 次 會 讓 第
• 間 Reversing Engineering
• 於 次 �� �'�
• ⼈人 ⼼心
• 明 想 →
• 主 →
好• 間 Reversing Engineering
• 於 次 �� �'�
• ⼈人 ⾃自 發 &�
• 明 想 →
• 主 →
好• 間 Reversing Engineering
• 於 次 �� �'�
• ⼈人 ⾃自 發 &�
• 明 想 →
• 主 →
(打Д´)ノ
• Reverse Engineering
• 全著 麼 友 於 次
• 會
•
• 中 有為
- 這到 到
�#3 "#3
%� /������
����
31)(�6(�$����,��*�����'!
-���42����'!
�05�'! 3+���� /���&.
到 友 - ⼼心 • Immunity Debugger ( ´∀`)ノ
• Olly Dbg ( ∀ )ノ
這到 友 - ⼼心 • IDA ( ´∀`)ノ
• IDA Pro Interactive Disassembler 會⼩小
• 這到 友
這到 友 增⼀一
• 經
•
• API
• ⼈人
這到 友 增⼀一(1)• 經
• 經 經於 ⽅方經
• ⼈人 友
•
• 是 經
• 無經 ⼼心 / 無經
UPX 經 知
?
這到 友 增⼀一(2)•
• ⼈人
•
• String Windows
• 了信 ⼈人
了信 知
這到 友 增⼀一(3)• API
• IDA Windows API
• API
•
• 要
API
• API (Application Programming Interface)
• ⼈人 裡
• Function
• 分
Windows API 知
這到 友 增⼀一(4)
• ⼈人
•
•
•
這到 友 增⼀一(4)
• ⼈人
•
• ⼈人意不
• 還 電
• 有為
有為 ⽣生
有為
age = input(‘How old are you?’)
if (age <18):
print ‘No you can’t drink beer.’
mov edx, OFFSET HowOldAreYou;
call WriteString;
call readint;
cmp eax,18d;
jb LessThan18;
LessThan18:
mov edx,OFFSET NoYouCantDrinkBeer;
call WriteString;
Python Assembly Language於 不
有為
• 得 有為
• 01010000
• 有為
• 有為 覺 家
• 和 MASM於NASM
有為
• ⼈人
• .EXE (executable file) 現
•
• ⼼心會 有為
有為
`��®XD
快
Turkey 知 友
!& SHA256:77c39cf091b0cb9f84a5d2a25e9c63f0bf9dcacb054a4f902fe36de6491aad14
~
~
1.ProcessExplorer 2.ProcessMonitor 3.TCPview 4.Wireshark 5.CaptureBAT ( �
ProcessExplorer & ProcessMonitor
• ProcessExplorer a�'I��@$�� Process
!
• 1����+�W$�� Processe "�+�@)�� Process e+��� ProcessMonitor d
���'I�B/ Process �W$
ProcessExplorer
c
s v p @B
ProcessExplorer
p v d V R@ P BTB
( R@ P BTB 75h # bki
PID
ProcessMonitor
u @B 8 FP c 750 V @B h 6F PB 75F P B 7 @ AB
c
ProcessMonitor
p v d V R@ P BTB
( R@ P BTB 75h # bki ) 1( A Pv 1( A P
S @ R@ BTBv S @ R@ BTB BI l ACA ) BD
ACA ) BDv ACA ) BD
TCPView
RM�'I��2� � Process KV
TCPView
p v d V R@ P BTB
( R@ P BTB 75h # bki ) 1( A Pv 1( A P
S @ R@ BTBv S @ R@ BTB BI l ACA ) BD
ACA ) BDv ACA ) BDq ( () )(
4 =FBSx c
Wireshark• �\Z?9�8N
• <0�4[Hidns,tcp,http,......
m V h
Wireshark
6F PB P@ kr ( () )(# u 4 =FBSr
w 6 S 4 P B I
Wireshark
k o 3 A:BM B P
6F PB A kr F PSB I S BP#F PSB I S BP pV7 ( () )(
Wireshark
p v d V R@ P BTB
( R@ P BTB 75h # bki ) 1( A Pv 1( A P
S @ R@ BTBv S @ R@ BTB BI l ACA ) BD
ACA ) BDv ACA ) BDq 7 ( () )(
. A F PSB I S BP pV7 h( () )(
Wireshark
6:C*��p
v d V R@ P BTB ( R@ P BTB 75h # bki ) 1( A Pv 1( A P
S @ R@ BTBv S @ R@ BTB BI l ACA ) BD
ACA ) BDv ACA ) BDq 7 ( () )(
. A F PSB I S BP pV7 h( () )(
�e#_P� [email protected] c~dfds3.reg �`S��O7���(�F/��-j
CaptureBAT• ��� SandBox
• �RM�'I�+��T)gex:.5$�c`S$�%%h
##_P�`Se��>LRMbf
.
• W$ CaptureBAT *eGJ,DA
CaptureBAT
EQi cd C:\Program Files\CaptureCaptureBAT.exe -c -n
* �X^ihttp://travisaltman.com/malware-analysis-tool-capture-bat/
CaptureBAT4 P B32 a l D m V h
deleted V
CaptureBAT#_P�~dfds3.reg `S;=i
p v d V R@ P BTB
( R@ P BTB 75h # bki ) 1( A Pv 1( A P
S @ R@ BTBv S @ R@ BTB BI l ACA ) BD
ACA ) BDv ACA ) BD ACA ) BD h e t~8 7 B RB BTB q 7 ( () )(
. A F PSB I S BP pV7 h( () )(
CaptureBAT
t~a V MSIServer.exe h n V”n ”
CaptureBAT_PU(� wscsvc.exe
p v d V R@ P BTB
( R@ P BTB 75h # bki ) 1( A Pv 1( A P 1( A P h VS @ R@ BTB
S @ R@ BTBv S @ R@ BTB BI l ACA ) BD
ACA ) BDv ACA ) BD ACA ) BD h e t~
8 7 B RB BTB q 7 ( () )(
. A F PSB I S BP pV7 h( () )(
CaptureBAT4 P B32 a l D m V h
deleted V
t~f Vn V
6:!&$�p
v d V R@ P BTB ( R@ P BTB 75h # bki ) 1( A Pv 1( A P 1( A P h VS @ R@ BTB
S @ R@ BTBv S @ R@ BTB BI l ACA ) BD
ACA ) BDv ACA ) BD ACA ) BD h e t~8 7 B RB BTB q 7 ( () )(
. A F PSB I S BP pV7 h( () )(