SlideShare una empresa de Scribd logo
1 de 11
Descargar para leer sin conexión
CSS×2.0
Polyglotシェルコードの
最高記録に挑戦しよう☆
☆NTTセキュアプラットフォーム研究所
☆中島明日香
Polyglotシェルコードとは
複数のアーキテクチャ上で
動作するシェルコードのこと
Polyglotシェルコードの仕組み[1/2]
アーキテクチャ1の
シェルコード
アーキテクチャ2の
シェルコード
シェルコードの先頭で各アーキテクチャの
シェルコードに分岐させる命令を置く
1への分岐命令
2への分岐命令
Polyglotシェルコードの仕組み[2/2]
あるアーキテクチャだと意味のない命令だが
別のアーキテクチャで分岐命令となる機械語を探す
1への分岐命令
■3アーキテクチャの場合
3への分岐命令
2への分岐命令
意味のない命令 意味のない命令
意味のない命令
シェルコード1へ シェルコード2へ シェルコード3へ
挑戦☆
過去のPolyglotシェルコードでは
4アーキテクチャが最高?
最低でも5アーキテクチャを目指す☆
試行錯誤・・・
‣遅延分岐するアーキテクチャは?
‣マイコン系は?
‣NOPに相当する命令は?
‣JMPに相当する命令は?
‣エンディアン違うとどうなるのか?
■振り分け処理生成補助
→ radare2 + objdump
■実行環境
→ qemu
結果☆
¥x42¥x90¥x0f¥xa0¥x00¥xd2¥x90¥90
¥xeb¥x00¥x00¥xea¥x48¥x31¥xc0¥x48
¥x85¥xc0¥x75¥x1d
x86, x86-64, armeb,armeb,powerpc, sheb
6アーキテクチャで実現!
シェルコードの詳細(先頭のみ)
inc edx
nop
push fs
add dl, dl
nop
nop
jmp 0xa
add dl, ch
dec eax
xor eax, eax
dec eax
test eax, eax
jne 0x31
rex.X xchg eax,eax
push fs
add dl,dl
nop
nop
jmp 0xa
add dl,ch
xor rax,rax
test rax,rax
jne 0x31
■x86 ■x86-64
REXプレフィックスの違いを利用して振り分ける
andge r9, pc, r2, asr 32
addsls sp, r0, r0, lsl 4
b 0x000003bc
stmiami r0, {r3, r6, r8, ip, sp}^
wldrhne wr12, [r5, -133]!
bc- 20, 4*cr4+lt, 0x00000fa0
lwa r24, 232(0)
b 0x0031c054
lwzu r14, 29981(0)
addsmi r0, r0, 160, 30
smullseq r9, r2, r0, r0
bl 0x000003b8
ldmdami r1!, {r3, r6, lr, pc}
strbhi r7, [r0, 1309]
mov.w 0x00000088,r0 ! 0x9042
bra 0x00000024
mov.l 0x00000008,r2 ! 0xd200
mov.w 0x0000012a,r0 ! 0x9090
.word 0x00eb mov #0,r10
sub r4,r1
.word 0x48c0
mov.b r0,@(133,gbr)
mov.l r7,@(20,r13)
■ARM(リトルエンディアン) ■ARM(ビッグエンディアン)
■PowerPC(ビッグエンディアン) ■SuperH-4(ビッグエンディアン)
※エンディアン違いを上手く利用して振り分ける
フィーリングで各アーキテクチャの
アセンブリが読めるようになってくる
単一のシェルコードで全てのPCを
操れて楽しい。実用性は・・。
感想
ご清聴ありがとうございました!

Más contenido relacionado

Destacado

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

[CSS×2.0 2014] Polyglotシェルコードの最高記録に挑戦しよう☆