SlideShare a Scribd company logo
1 of 1
Download to read offline
RLY

wTw

xecutable inkable
yyyyyyyyyyyyyyyyv

ormat

a Linux executable walkthrough

7ngey7lbertini
corkamiIcom

static

Hexadecimalydump

7S&IIydump

w

zissectedyfile
mxvixvRxvzx/px/px/px//x//x//x//x//x//x//x//x//xxfu'ffffffffffff
/_x//x/yx//x/px//x//x//xz/x//x//x/gxv/x//x//x//xxffffffff`fffSfff
R/x//x//x//x//x//x//x//xyvx//x_/x//x/px//x_gx//xxÍfffffffvfffffºf
/vx//x/yx//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxffff
mxvixvRxvzx/px/px/px//x//x//x//x//x//x//x//x//xx u'ffffffffffff
/_x//x/yx//x/px//x//x//xz/x//x//x/gxv/x//x//x//xxffffffff`fffSfff
R/x//x//x//x//x//x//x//xyvx//x_/x//x/px//x_gx//xxÀfffffffvfffffºf
identifyyasyanyRLYytype
specifyytheyarchitecture
/vx//x/yx//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff

RLYyheader

~$uname -p
i686
~$./simple.elf
Hello World!
///,
mxvixvRxvzx/px/px/px//x//x//x//x//x//x//x//x//xx u'ffffffffffff
/_x//x/yx//x/px//x//x//xz/x//x//x/gxv/x//x//x//xxffffffff`fffSfff
R/x//x//x//x//x//x//x//xyvx//x_/x//x/px//x_gx//xxÀfffffffvfffffºf
/vx//x/yx//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff

ProgramyHeaderytable

/px//x//x//x//x//x//x//x//x//x//x/gx//x//x//x/gxxffffffffffffffff
T/x//x//x//xT/x//x//x//x/ix//x//x//x//x//x//x//xxffffffffffffffff
Rxecutionyinformation

Header

U

Offset,/xv/:Tddress,/xg////v/

/px//x//x//x//x//x//x//x//x//x//x/gx//x//x//x/gxxxffffffffffffffff
T/x//x//x//xT/x//x//x//x/ix//x//x//ffffxxxxxxxxxxxxxxffffffff

wVU

mxvixvRxvzx/px/px/px//x//x//x//x//x//x//x//x//xx u'ffffffffffff
/_x//x/yx//x/px//x//x//xz/x//x//x/gxv/x//x//x//xxffffffff`fffSfff
R/x//x//x//x//x//x//x//xyvx//x_/x//x/px//x_gx//xxÀfffffffvfffffºf
/vx//x/yx//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff

technicalydetailsyfory
identificationyandyexecution

/px//x//x//x//x//x//x//x//x//x//x/gx//x//x//x/gxxffffffffffffffff
T/x//x//x//xT/x//x//x//x/ix//x//x//x//x//x//x//xxffffffffffffffff

/v/,
/px//x//x//x//x//x//x//x//x//x//x/gx//x//x//x/gxxffffffffffffffff
i/x//x//x//xi/x//x//x//x/ix//x//x//x//x//x//x//xxffffffffffffffff
/z/,
Vcxc/x//x//x/gxVTx/Nx//x//x//xVVx/px//x//x//xVgxx¹fxfffºffff»ffff¸
/vx//x//x//xRNxg/xVVx/px//x//x//xVgx/px//x//x//xxffffÍ€»ffff¸ffff
RNxg/x//x//x//x//x//x//x//x//x//x//x//x//x//x//xx̀ffffffffffffff

simpleIelf

/c/,
vgxzixzRxzRxzx_/ximxzxm_xzRxzvx_px/Tx//x//x//xxXellofWorldoffff
/a/,
//x_uxmyxzgxmyxmvxm_xmvxzpxz_x//x_uxmvxzixmgxmvxxffshstrtabfftext
//x_uxm_xzxzvxzpxmvxzpx//x//x//x//x//x//x//x//xxffrodataffffffff
SH7AwBy9:U,*9-:b-:b:X*bwNfd,*bTNXXa,-*TebcadcNb

downloady@yelfwTwIcorkamiIcom
/T/,
//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//x/Vx//x//x//x/px//x//x//xxffffffffffffffff
/zx//x//x//xz/x//x//x/gxz/x//x//x//x__x//x//x//xxffff`fff`fffdfff
//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
ppx//x//x//x/px//x//x//x/_x//x//x//xc/x//x//x/gxxffffffffffffxfff
c/x//x//x//x/Nx//x//x//x//x//x//x//x//x//x//x//xxxfffffffffffffff
//x//x//x//x//x//x//x//x/px//x//x//x/yx//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//xT/x//x//x//xpcx//x//x//xxffffffffxfffffff
//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff

sections

Vcxc/x//x//x/gxVTx/Nx//x//x//xVVx/px//x//x//xVgxx¹fxfffºffff»ffff¸
/vx//x//x//xRNxg/xVVx/px//x//x//xVgx/px//x//x//xxffffÍ€»ffff¸ffff
RNxg/x//x//x//x//x//x//x//x//x//x//x//x//x//x//xx̀ffffffffffffff

Vcxc/x//x//x/gxVTx/Nx//x//x//xVVx/px//x//x//xVgxx¹fxfffºffff»ffff¸
/vx//x//x//xRNxg/xVVx/px//x//x//xVgx/px//x//x//xxffffÍ€»ffff¸ffff
executableyinformation
RNxg/x//x//x//x//x//x//x//x//x//x//x//x//x//x//xx̀ffffffffffffff

&ode

vgxzixzRxzRxzx_/ximxzxm_xzRxzvx_px/Tx//x//x//xxXellofWorldoffff

contentsyofytheyexecutable
//x_uxmyxzgxmyxmvxm_xmvxzpxz_x//x_uxmvxzixmgxmvxxffshstrtabfftext
//x_uxm_xzxzvxzpxmvxzpx//x//x//x//x//x//x//x//xxffrodataffffffff

N
Offset,/xz/:Tddress,/xg////z/
p

zata

vgxzixzRxzRxzx_/ximxzxm_xzRxzvx_px/Tx//x//x//xxXellofWorldoffff
informationyusedybyytheycode

Values

Rxplanation

/xm€xdu'd
pxxxx€p
p
_
y
p
/xg////z/
/xv/
/xR/
/xyv
/x_/
p
/x_g
v
y

constantysignature
NUybits/yLittleARndian
7lwaysyw
Rxecutable
IntelyN-9y0andylater.
7lwaysyw
7ddressywhereyexecutionystarts
ProgramyHeaders1yoffset
SectionyHeaders1yoffset
Rlfyheader1sysize
SizeyofyaysingleyProgramyHeader
&ountyofyProgramyHeaders
SizeyofyaysingleySectionyHeader
&ountyofySectionyHeaders
Indexyofytheynames1ysectionyinytheytable

p_type
p_offset
p_vaddr
p_paddr
p_filesz
p_memsz
p_flags

p
/
/xg//////
/xg//////
/xT/
/xT/
i

u'R'TSSy_

u'NTTT_'SV

uV_RURRuNT
uT_uXuR
uM_ygz

uV_RURRuNT

N

Theysegmentyshouldybeyloadedyinymemory
Offsetywhereyityshouldybeyread
Virtualyaddressywhereyityshouldybeyloaded
Physicalyaddressywhereyityshouldybeyloaded
Sizeyonyfile
Sizeyinymemory
ReadableyandyeXecutable

PT_'OTN

P_R|P_X

Rquivalenty&ycode

x-9yassembly
movxecx€x/xg///c/
movxedx€x/xN
movxebx€xp
movxeax€xv
intx/xg/

msg

MSU_'uN

STNOUT

_

v

Vcxc/x//x//x/gxVTx/Nx//x//x//xVVx/px//x//x//xVgxxffffffffffffffff
/vx//x//x//xRNxg/xVVx/px//x//x//xVgx/px//x//x//xxffffffffffffffff
i

Yields
e_identx
xxuP_MTU
xxuP_R'TSS€xuP_NTTT
xxuP_VuRSPON
e_type
e_machine
e_version
e_entry
e_phoff
e_shoff
e_ehsize
e_phentsize
e_phnum
e_shentsize
e_shnum
e_shstrndx

y

z

m

SR_WRPTu

systemxcall

writeb2Hello6World8r2,6STDOUT,6lenb2Hello6World8r2AA;

g

RNxg/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxff

movxebx€xp
movxeax€xp
intx/xg/

returnxcode
SR_uXPT

systemxcall

//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//x/Vx//x//x//x/px//x//x//xxffffffffffffffff
/zx//x//x//xz/x//x//x/gxz/x//x//x//x__x//x//x//xxffff`fff`fffdfff
//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
ppx//x//x//x/px//x//x//x/_x//x//x//xc/x//x//x/gxxffffffffffffxfff
c/x//x//x//x/Nx//x//x//x//x//x//x//x//x//x//x//xxxfffffffffffffff
//x//x//x//x//x//x//x//x/px//x//x//x/yx//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//xT/x//x//x//xpcx//x//x//xxffffffffxfffffff
//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff

//x_uxmyxzgxmyxmvxm_xmvxzpxz_x//x_uxmvxzixmgxmvxxffshstrtabfftext
//x_uxm_xzxzvxzpxmvxzpx//x//x//x//x//x//x//x//xxffrodataffffffff

Sections1ynames

Strings

Offset,/xc/:Tddress,/xg////c/

header

UVU

vgxzixzRxzRxzx_/ximxzxm_xzRxzvx_px/Tx//xxxxxxxxXellofWorldoff

technicalydetailsyforylinking
0ignoredyforyexecution.

dXelloxWorldord€x/

Sectionynames

Offset,/xT/

//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//x/Vx//x//x//x/px//x//x//xxffffffffffffffff
/zx//x//x//xz/x//x//x/gxz/x//x//x//x__x//x//x//xxffff`fff`fffdfff
//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
ppx//x//x//x/px//x//x//x/_x//x//x//xc/x//x//x/gxxffffffffffffffff
Linkingy0connectingyprogramyobjects.yinformation
c/x//x//x//x/Nx//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//x/px//x//x//x/yx//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//xT/x//x//x//xpcx//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff

SectionyHeaderytable

//x_uxmyxzgxmyxmvxm_xmvxzpxz_x//x_uxmvxzixmgxmvxxffshstrtabfftext
//x_uxm_xzxzvxzpxmvxzpx//xxxxxxxxxxxxxxxxxxxxxxxffrodataf

exitb1A;

ddxxfshrtrtabxxftextxxxxfrodata

Offset,/xR/

//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//x/Vx//x//x//x/px//x//x//xxffffffffffffffff
/zx//x//x//xz/x//x//x/gxz/x//x//x//x__x//x//x//xxffff`fff`fffdfff
//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
ppx//x//x//x/px//x//x//x/_x//x//x//xc/x//x//x/gxxffffffffffffffff
c/x//x//x//x/Nx//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//x/px//x//x//x/yx//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//xT/x//x//x//xpcx//x//x//xxffffffffffffffff
//x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff

SectionyHeaderytable
sh_name

sh_type

theyRLYyheaderyisyparsed
theyProgramyHeaderyisyparsed

sh_addr

sh_offset

sh_size

SXT_NU''xºinactive»

SXT_PROUVPTSxºprogram»

SX_T''ORxºallocated»
SX_uXuRPNSTRxºexecutable»

SXT_PROUVPTSxºprogram»

SX_T''ORxºallocated»

SXT_STRTTVxºstringxtable»

relativexoffsets
inxnames¹xsection

Thisyisytheywholeyfile/yhowever/ymostyRLYyfilesycontainymanyymoreyelementsI
Rxplanationsyareysimplified/yforyconcisenessI

Loadingyprocess
w header

sh_flags

IndexyyyyNameyyyyyyyyyyyyyyyTYPRyyyyyyyyyyyyyyyyyyyyyyYL7ZSyyyyyyyyyyyyyyyyyy7zzRRSSyyyyyyyyyyyyOYYSRTyyyyyyyySIZR
6066<null>6666606
6166.text666666166666666666666666666660x8000060660x606660x22
6266.rodata6666166666666666266666666660x8000090660x906660x0D
6366.shrtrtab6636666666666666666666666666666666660xA06660x19

U Mapping

N Rxecution

theyfileyisymappedyinymemory
accordingytoyitsysegment0s.

Offset

Virtual Address

0Sectionsyareynotyused.

0x00

0xA0

0x80000A0

p_vaddr

p_memsz

LOAD Segment

0x8000000

p_filesz

p_offset

Rntryyisycalled
SyscallsyyyareyaccessedyviaB
yAySyscallynumberyinytheyR7Xyregister
yAycallingyInterruptyTx-T
kernel
services

Trivia
TheyRLYywasyfirstyspecifiedybyyUISIyLI
foryUNIXySystemyV/yinyw**T
nix

ystem

aboratories

,

TheyRLYyisyused/yamongyothers/yinBy
yAyLinux/y7ndroid/y25Sz/ySolaris/y5eOS
yAyPSP/yPlaystationyUAX/yzreamcast/yZame&ube/yWii
AyvariousyOSesymadeybyySamsung/yRricsson/yNokia/
AyMicrocontrollersyfromy7tmel/yTexasyInstruments
versionywIT
UTwNVwwVUT

More Related Content

Viewers also liked

Generando Politicas
Generando Politicas Generando Politicas
Generando Politicas jgalud
 
2Jean carlo muñoz martinez gixo
2Jean carlo muñoz martinez gixo2Jean carlo muñoz martinez gixo
2Jean carlo muñoz martinez gixoauraparada
 
Optimum nutrition 100% casein chocolate
Optimum nutrition 100% casein chocolateOptimum nutrition 100% casein chocolate
Optimum nutrition 100% casein chocolateRyan Edwards
 
Business presentaton plan portuguese
Business presentaton plan portugueseBusiness presentaton plan portuguese
Business presentaton plan portugueseconligus2
 
Kerstbrunch Du Theatre
Kerstbrunch Du TheatreKerstbrunch Du Theatre
Kerstbrunch Du TheatreOnno Pel
 
La Revolucio Industrial
La Revolucio IndustrialLa Revolucio Industrial
La Revolucio Industrialjiplena
 
Presentacionedu2 0
Presentacionedu2 0Presentacionedu2 0
Presentacionedu2 0jmrvalcala
 
Tugas 2 - Windows 8 Mulok
Tugas 2 - Windows 8 MulokTugas 2 - Windows 8 Mulok
Tugas 2 - Windows 8 MulokAnnisyaPU
 
Unidad didáctica curso cep
Unidad didáctica curso cepUnidad didáctica curso cep
Unidad didáctica curso cepjaen61
 
гарантії якості
гарантії якостігарантії якості
гарантії якостіpanchyk
 
13日心シンポ話題提供スライド(web心理学ミュージアム)
13日心シンポ話題提供スライド(web心理学ミュージアム)13日心シンポ話題提供スライド(web心理学ミュージアム)
13日心シンポ話題提供スライド(web心理学ミュージアム)Mia Takeda
 
Lesson 05: Document Class, Events and FlashDevelop Tool
Lesson 05: Document Class, Events and  FlashDevelop ToolLesson 05: Document Class, Events and  FlashDevelop Tool
Lesson 05: Document Class, Events and FlashDevelop ToolHallo Patidu
 

Viewers also liked (17)

Generando Politicas
Generando Politicas Generando Politicas
Generando Politicas
 
2Jean carlo muñoz martinez gixo
2Jean carlo muñoz martinez gixo2Jean carlo muñoz martinez gixo
2Jean carlo muñoz martinez gixo
 
Trab.adeildo
Trab.adeildoTrab.adeildo
Trab.adeildo
 
Mkt2
Mkt2Mkt2
Mkt2
 
Maneira de amar
Maneira de amarManeira de amar
Maneira de amar
 
1 slides - conceitos logísticos
1   slides - conceitos logísticos1   slides - conceitos logísticos
1 slides - conceitos logísticos
 
20160905185942680
2016090518594268020160905185942680
20160905185942680
 
Optimum nutrition 100% casein chocolate
Optimum nutrition 100% casein chocolateOptimum nutrition 100% casein chocolate
Optimum nutrition 100% casein chocolate
 
Business presentaton plan portuguese
Business presentaton plan portugueseBusiness presentaton plan portuguese
Business presentaton plan portuguese
 
Kerstbrunch Du Theatre
Kerstbrunch Du TheatreKerstbrunch Du Theatre
Kerstbrunch Du Theatre
 
La Revolucio Industrial
La Revolucio IndustrialLa Revolucio Industrial
La Revolucio Industrial
 
Presentacionedu2 0
Presentacionedu2 0Presentacionedu2 0
Presentacionedu2 0
 
Tugas 2 - Windows 8 Mulok
Tugas 2 - Windows 8 MulokTugas 2 - Windows 8 Mulok
Tugas 2 - Windows 8 Mulok
 
Unidad didáctica curso cep
Unidad didáctica curso cepUnidad didáctica curso cep
Unidad didáctica curso cep
 
гарантії якості
гарантії якостігарантії якості
гарантії якості
 
13日心シンポ話題提供スライド(web心理学ミュージアム)
13日心シンポ話題提供スライド(web心理学ミュージアム)13日心シンポ話題提供スライド(web心理学ミュージアム)
13日心シンポ話題提供スライド(web心理学ミュージアム)
 
Lesson 05: Document Class, Events and FlashDevelop Tool
Lesson 05: Document Class, Events and  FlashDevelop ToolLesson 05: Document Class, Events and  FlashDevelop Tool
Lesson 05: Document Class, Events and FlashDevelop Tool
 

More from Ange Albertini

Technical challenges with file formats
Technical challenges with file formatsTechnical challenges with file formats
Technical challenges with file formatsAnge Albertini
 
Relations between archive formats
Relations between archive formatsRelations between archive formats
Relations between archive formatsAnge Albertini
 
Abusing archive file formats
Abusing archive file formatsAbusing archive file formats
Abusing archive file formatsAnge Albertini
 
You are *not* an idiot
You are *not* an idiotYou are *not* an idiot
You are *not* an idiotAnge Albertini
 
Improving file formats
Improving file formatsImproving file formats
Improving file formatsAnge Albertini
 
An introduction to inkscape
An introduction to inkscapeAn introduction to inkscape
An introduction to inkscapeAnge Albertini
 
The challenges of file formats
The challenges of file formatsThe challenges of file formats
The challenges of file formatsAnge Albertini
 
Exploiting hash collisions
Exploiting hash collisionsExploiting hash collisions
Exploiting hash collisionsAnge Albertini
 
Connecting communities
Connecting communitiesConnecting communities
Connecting communitiesAnge Albertini
 
TASBot - the perfectionist
TASBot - the perfectionistTASBot - the perfectionist
TASBot - the perfectionistAnge Albertini
 
Caring for file formats
Caring for file formatsCaring for file formats
Caring for file formatsAnge Albertini
 
Trusting files (and their formats)
Trusting files (and their formats)Trusting files (and their formats)
Trusting files (and their formats)Ange Albertini
 
Let's write a PDF file
Let's write a PDF fileLet's write a PDF file
Let's write a PDF fileAnge Albertini
 

More from Ange Albertini (20)

Technical challenges with file formats
Technical challenges with file formatsTechnical challenges with file formats
Technical challenges with file formats
 
Relations between archive formats
Relations between archive formatsRelations between archive formats
Relations between archive formats
 
Abusing archive file formats
Abusing archive file formatsAbusing archive file formats
Abusing archive file formats
 
TimeCryption
TimeCryptionTimeCryption
TimeCryption
 
You are *not* an idiot
You are *not* an idiotYou are *not* an idiot
You are *not* an idiot
 
Improving file formats
Improving file formatsImproving file formats
Improving file formats
 
KILL MD5
KILL MD5KILL MD5
KILL MD5
 
No more dumb hex!
No more dumb hex!No more dumb hex!
No more dumb hex!
 
Beyond your studies
Beyond your studiesBeyond your studies
Beyond your studies
 
An introduction to inkscape
An introduction to inkscapeAn introduction to inkscape
An introduction to inkscape
 
The challenges of file formats
The challenges of file formatsThe challenges of file formats
The challenges of file formats
 
Exploiting hash collisions
Exploiting hash collisionsExploiting hash collisions
Exploiting hash collisions
 
Infosec & failures
Infosec & failuresInfosec & failures
Infosec & failures
 
Connecting communities
Connecting communitiesConnecting communities
Connecting communities
 
TASBot - the perfectionist
TASBot - the perfectionistTASBot - the perfectionist
TASBot - the perfectionist
 
Caring for file formats
Caring for file formatsCaring for file formats
Caring for file formats
 
Hacks in video games
Hacks in video gamesHacks in video games
Hacks in video games
 
Trusting files (and their formats)
Trusting files (and their formats)Trusting files (and their formats)
Trusting files (and their formats)
 
Let's write a PDF file
Let's write a PDF fileLet's write a PDF file
Let's write a PDF file
 
PDF: myths vs facts
PDF: myths vs factsPDF: myths vs facts
PDF: myths vs facts
 

Recently uploaded

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Recently uploaded (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

ELF101 a Linux executable walkthrough

  • 1. RLY wTw xecutable inkable yyyyyyyyyyyyyyyyv ormat a Linux executable walkthrough 7ngey7lbertini corkamiIcom static Hexadecimalydump 7S&IIydump w zissectedyfile mxvixvRxvzx/px/px/px//x//x//x//x//x//x//x//x//xxfu'ffffffffffff /_x//x/yx//x/px//x//x//xz/x//x//x/gxv/x//x//x//xxffffffff`fffSfff R/x//x//x//x//x//x//x//xyvx//x_/x//x/px//x_gx//xxÍfffffffvfffffºf /vx//x/yx//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxffff mxvixvRxvzx/px/px/px//x//x//x//x//x//x//x//x//xx u'ffffffffffff /_x//x/yx//x/px//x//x//xz/x//x//x/gxv/x//x//x//xxffffffff`fffSfff R/x//x//x//x//x//x//x//xyvx//x_/x//x/px//x_gx//xxÀfffffffvfffffºf identifyyasyanyRLYytype specifyytheyarchitecture /vx//x/yx//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff RLYyheader ~$uname -p i686 ~$./simple.elf Hello World! ///, mxvixvRxvzx/px/px/px//x//x//x//x//x//x//x//x//xx u'ffffffffffff /_x//x/yx//x/px//x//x//xz/x//x//x/gxv/x//x//x//xxffffffff`fffSfff R/x//x//x//x//x//x//x//xyvx//x_/x//x/px//x_gx//xxÀfffffffvfffffºf /vx//x/yx//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff ProgramyHeaderytable /px//x//x//x//x//x//x//x//x//x//x/gx//x//x//x/gxxffffffffffffffff T/x//x//x//xT/x//x//x//x/ix//x//x//x//x//x//x//xxffffffffffffffff Rxecutionyinformation Header U Offset,/xv/:Tddress,/xg////v/ /px//x//x//x//x//x//x//x//x//x//x/gx//x//x//x/gxxxffffffffffffffff T/x//x//x//xT/x//x//x//x/ix//x//x//ffffxxxxxxxxxxxxxxffffffff wVU mxvixvRxvzx/px/px/px//x//x//x//x//x//x//x//x//xx u'ffffffffffff /_x//x/yx//x/px//x//x//xz/x//x//x/gxv/x//x//x//xxffffffff`fffSfff R/x//x//x//x//x//x//x//xyvx//x_/x//x/px//x_gx//xxÀfffffffvfffffºf /vx//x/yx//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff technicalydetailsyfory identificationyandyexecution /px//x//x//x//x//x//x//x//x//x//x/gx//x//x//x/gxxffffffffffffffff T/x//x//x//xT/x//x//x//x/ix//x//x//x//x//x//x//xxffffffffffffffff /v/, /px//x//x//x//x//x//x//x//x//x//x/gx//x//x//x/gxxffffffffffffffff i/x//x//x//xi/x//x//x//x/ix//x//x//x//x//x//x//xxffffffffffffffff /z/, Vcxc/x//x//x/gxVTx/Nx//x//x//xVVx/px//x//x//xVgxx¹fxfffºffff»ffff¸ /vx//x//x//xRNxg/xVVx/px//x//x//xVgx/px//x//x//xxffffÍ€»ffff¸ffff RNxg/x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxÍ€ffffffffffffff simpleIelf /c/, vgxzixzRxzRxzx_/ximxzxm_xzRxzvx_px/Tx//x//x//xxXellofWorldoffff /a/, //x_uxmyxzgxmyxmvxm_xmvxzpxz_x//x_uxmvxzixmgxmvxxffshstrtabfftext //x_uxm_xzxzvxzpxmvxzpx//x//x//x//x//x//x//x//xxffrodataffffffff SH7AwBy9:U,*9-:b-:b:X*bwNfd,*bTNXXa,-*TebcadcNb downloady@yelfwTwIcorkamiIcom /T/, //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//x/Vx//x//x//x/px//x//x//xxffffffffffffffff /zx//x//x//xz/x//x//x/gxz/x//x//x//x__x//x//x//xxffff`fff`fffdfff //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff ppx//x//x//x/px//x//x//x/_x//x//x//xc/x//x//x/gxxffffffffffffxfff c/x//x//x//x/Nx//x//x//x//x//x//x//x//x//x//x//xxxfffffffffffffff //x//x//x//x//x//x//x//x/px//x//x//x/yx//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//xT/x//x//x//xpcx//x//x//xxffffffffxfffffff //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff sections Vcxc/x//x//x/gxVTx/Nx//x//x//xVVx/px//x//x//xVgxx¹fxfffºffff»ffff¸ /vx//x//x//xRNxg/xVVx/px//x//x//xVgx/px//x//x//xxffffÍ€»ffff¸ffff RNxg/x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxÍ€ffffffffffffff Vcxc/x//x//x/gxVTx/Nx//x//x//xVVx/px//x//x//xVgxx¹fxfffºffff»ffff¸ /vx//x//x//xRNxg/xVVx/px//x//x//xVgx/px//x//x//xxffffÍ€»ffff¸ffff executableyinformation RNxg/x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxÍ€ffffffffffffff &ode vgxzixzRxzRxzx_/ximxzxm_xzRxzvx_px/Tx//x//x//xxXellofWorldoffff contentsyofytheyexecutable //x_uxmyxzgxmyxmvxm_xmvxzpxz_x//x_uxmvxzixmgxmvxxffshstrtabfftext //x_uxm_xzxzvxzpxmvxzpx//x//x//x//x//x//x//x//xxffrodataffffffff N Offset,/xz/:Tddress,/xg////z/ p zata vgxzixzRxzRxzx_/ximxzxm_xzRxzvx_px/Tx//x//x//xxXellofWorldoffff informationyusedybyytheycode Values Rxplanation /xm€xdu'd pxxxx€p p _ y p /xg////z/ /xv/ /xR/ /xyv /x_/ p /x_g v y constantysignature NUybits/yLittleARndian 7lwaysyw Rxecutable IntelyN-9y0andylater. 7lwaysyw 7ddressywhereyexecutionystarts ProgramyHeaders1yoffset SectionyHeaders1yoffset Rlfyheader1sysize SizeyofyaysingleyProgramyHeader &ountyofyProgramyHeaders SizeyofyaysingleySectionyHeader &ountyofySectionyHeaders Indexyofytheynames1ysectionyinytheytable p_type p_offset p_vaddr p_paddr p_filesz p_memsz p_flags p / /xg////// /xg////// /xT/ /xT/ i u'R'TSSy_ u'NTTT_'SV uV_RURRuNT uT_uXuR uM_ygz uV_RURRuNT N Theysegmentyshouldybeyloadedyinymemory Offsetywhereyityshouldybeyread Virtualyaddressywhereyityshouldybeyloaded Physicalyaddressywhereyityshouldybeyloaded Sizeyonyfile Sizeyinymemory ReadableyandyeXecutable PT_'OTN P_R|P_X Rquivalenty&ycode x-9yassembly movxecx€x/xg///c/ movxedx€x/xN movxebx€xp movxeax€xv intx/xg/ msg MSU_'uN STNOUT _ v Vcxc/x//x//x/gxVTx/Nx//x//x//xVVx/px//x//x//xVgxxffffffffffffffff /vx//x//x//xRNxg/xVVx/px//x//x//xVgx/px//x//x//xxffffffffffffffff i Yields e_identx xxuP_MTU xxuP_R'TSS€xuP_NTTT xxuP_VuRSPON e_type e_machine e_version e_entry e_phoff e_shoff e_ehsize e_phentsize e_phnum e_shentsize e_shnum e_shstrndx y z m SR_WRPTu systemxcall writeb2Hello6World8r2,6STDOUT,6lenb2Hello6World8r2AA; g RNxg/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxff movxebx€xp movxeax€xp intx/xg/ returnxcode SR_uXPT systemxcall //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//x/Vx//x//x//x/px//x//x//xxffffffffffffffff /zx//x//x//xz/x//x//x/gxz/x//x//x//x__x//x//x//xxffff`fff`fffdfff //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff ppx//x//x//x/px//x//x//x/_x//x//x//xc/x//x//x/gxxffffffffffffxfff c/x//x//x//x/Nx//x//x//x//x//x//x//x//x//x//x//xxxfffffffffffffff //x//x//x//x//x//x//x//x/px//x//x//x/yx//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//xT/x//x//x//xpcx//x//x//xxffffffffxfffffff //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff //x_uxmyxzgxmyxmvxm_xmvxzpxz_x//x_uxmvxzixmgxmvxxffshstrtabfftext //x_uxm_xzxzvxzpxmvxzpx//x//x//x//x//x//x//x//xxffrodataffffffff Sections1ynames Strings Offset,/xc/:Tddress,/xg////c/ header UVU vgxzixzRxzRxzx_/ximxzxm_xzRxzvx_px/Tx//xxxxxxxxXellofWorldoff technicalydetailsyforylinking 0ignoredyforyexecution. dXelloxWorldord€x/ Sectionynames Offset,/xT/ //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//x/Vx//x//x//x/px//x//x//xxffffffffffffffff /zx//x//x//xz/x//x//x/gxz/x//x//x//x__x//x//x//xxffff`fff`fffdfff //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff ppx//x//x//x/px//x//x//x/_x//x//x//xc/x//x//x/gxxffffffffffffffff Linkingy0connectingyprogramyobjects.yinformation c/x//x//x//x/Nx//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//x/px//x//x//x/yx//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//xT/x//x//x//xpcx//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff SectionyHeaderytable //x_uxmyxzgxmyxmvxm_xmvxzpxz_x//x_uxmvxzixmgxmvxxffshstrtabfftext //x_uxm_xzxzvxzpxmvxzpx//xxxxxxxxxxxxxxxxxxxxxxxffrodataf exitb1A; ddxxfshrtrtabxxftextxxxxfrodata Offset,/xR/ //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//x/Vx//x//x//x/px//x//x//xxffffffffffffffff /zx//x//x//xz/x//x//x/gxz/x//x//x//x__x//x//x//xxffff`fff`fffdfff //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff ppx//x//x//x/px//x//x//x/_x//x//x//xc/x//x//x/gxxffffffffffffffff c/x//x//x//x/Nx//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//x/px//x//x//x/yx//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//xT/x//x//x//xpcx//x//x//xxffffffffffffffff //x//x//x//x//x//x//x//x//x//x//x//x//x//x//x//xxffffffffffffffff SectionyHeaderytable sh_name sh_type theyRLYyheaderyisyparsed theyProgramyHeaderyisyparsed sh_addr sh_offset sh_size SXT_NU''xºinactive» SXT_PROUVPTSxºprogram» SX_T''ORxºallocated» SX_uXuRPNSTRxºexecutable» SXT_PROUVPTSxºprogram» SX_T''ORxºallocated» SXT_STRTTVxºstringxtable» relativexoffsets inxnames¹xsection Thisyisytheywholeyfile/yhowever/ymostyRLYyfilesycontainymanyymoreyelementsI Rxplanationsyareysimplified/yforyconcisenessI Loadingyprocess w header sh_flags IndexyyyyNameyyyyyyyyyyyyyyyTYPRyyyyyyyyyyyyyyyyyyyyyyYL7ZSyyyyyyyyyyyyyyyyyy7zzRRSSyyyyyyyyyyyyOYYSRTyyyyyyyySIZR 6066<null>6666606 6166.text666666166666666666666666666660x8000060660x606660x22 6266.rodata6666166666666666266666666660x8000090660x906660x0D 6366.shrtrtab6636666666666666666666666666666666660xA06660x19 U Mapping N Rxecution theyfileyisymappedyinymemory accordingytoyitsysegment0s. Offset Virtual Address 0Sectionsyareynotyused. 0x00 0xA0 0x80000A0 p_vaddr p_memsz LOAD Segment 0x8000000 p_filesz p_offset Rntryyisycalled SyscallsyyyareyaccessedyviaB yAySyscallynumberyinytheyR7Xyregister yAycallingyInterruptyTx-T kernel services Trivia TheyRLYywasyfirstyspecifiedybyyUISIyLI foryUNIXySystemyV/yinyw**T nix ystem aboratories , TheyRLYyisyused/yamongyothers/yinBy yAyLinux/y7ndroid/y25Sz/ySolaris/y5eOS yAyPSP/yPlaystationyUAX/yzreamcast/yZame&ube/yWii AyvariousyOSesymadeybyySamsung/yRricsson/yNokia/ AyMicrocontrollersyfromy7tmel/yTexasyInstruments versionywIT UTwNVwwVUT