Who are we? Jos Wetzels Ali Abbasi


QNX Shellcoding: Syscalls



Download 10,05 Mb.
bet7/11
Sana27.10.2022
Hajmi10,05 Mb.
#857052
1   2   3   4   5   6   7   8   9   10   11
Bog'liq
wetzels dissecting qnx infiltrate 2018 (1)

QNX Shellcoding: Syscalls

  • Native syscalls invoked with usual instructions
    • SYSENTER / INT 0x28 / SWI / SC / etc.
    • Syscall # in EAX (x86), R12 (ARM), R0 (PPC)
    • Listing in /usr/include/sys/kercalls.h
  • Syscall entrypoint in __ker_entry / __ker_sysenter
    • Save registers
    • Switch to kernel stack
    • Get active kernel thread
    • Wait until we are on right CPU
    • Acquire kernel
  • Syscall # is index into ker_call_table

QNX Shellcoding: Syscalls

QNX Shellcoding: Syscalls

  • If you want to do anything non-trivial, gotta do it by message-passing…
  • Consider: simple execl/execve shellcode
    • execl/execve (@libc) → spawn (@libc) -> MsgSendvc
  • Craft message structure in memory
    • proc_spawn_t
  • Craft Input/Output Vector (IOV) in memory
    • iov_t
  • Issue message using native syscall
    • Eg. eax = 0x0C → int 0x28
  • Shellcode rapidly grows bulky

Pseudo-Random Number Generators (PRNGs)

QNX Security-Oriented PRNGs

QNX Security-Oriented PRNGs

Userspace PRNG

  • Accessed through /dev/random
  • Handled by userspace service random running as root
  • Started after boot via /etc/rc.d/startup.sh
  • Kernelspace PRNG (QNX 7)

  • Implemented in procnto as function named random_value
  • Cannot be accessed directly in userspace

QNX 6 /dev/random

QNX 6 /dev/random

  • Covered this in our talk ‘Wheel of Fortune’ at 33C3, brief recap
  • Underlying PRNG based on old version of Yarrow (Schneier et al.)
  • Low boot-time entropy
    • Avg. min-entropy: 0.0276
  • Broken reseed control
  • Entropy source selection up to system integrators…

Download 10,05 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   10   11




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish