45
An#$Forensics AF @dualcoremusic

Anti-Forensics AF (PDF)

  • Upload
    buidieu

  • View
    246

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Anti-Forensics AF (PDF)

An#$Forensics,AF,

@dualcoremusic,

Page 2: Anti-Forensics AF (PDF)

mov$eax,$0x6b;$int$0x80$

•  Rapper,•  Some,other,stuff,idk,

Page 3: Anti-Forensics AF (PDF)

Overview,

•  Memory,Forensics,vs,SMC*,– Windows,– Linux,

•  Android,(An#$)Forensics,•  Fun,with,SD,cards,

Page 4: Anti-Forensics AF (PDF)

Disclaimers,

•  !Professional,•  TROLOLOLOL,•  !Expert,/,YMMV,•  DO,ILLEGAL,THINGS,,

Page 5: Anti-Forensics AF (PDF)

Memory,Forensics,

•  Focus,on,soSware,protec#on,(malware),•  Persist,,thwart,detec#on,•  Inhibit,acquisi#on,and,analysis,

,

Page 6: Anti-Forensics AF (PDF)

Memory,Forensics,

•  All,the,cool,stuff,happens,in,memory,•  Loading,from,disk,•  Why,can’t,I,hold,all,these,sec#ons?,

,

Page 7: Anti-Forensics AF (PDF)

Memory,Forensics,

•  No,longer,referenced,,no,longer,needed,•  Analysis,tools,madbro,•  Lots,of,fun,to,be,had,

,

Page 8: Anti-Forensics AF (PDF)

Memory,Forensics,

•  Demo,–  thekeysarelikerightnexZoeachother.exe,•  Rekall,(winpmem),

,<tatclass> YOU ALL SUCK DICK <tatclass> er. <tatclass> hi. <andy\code> A common typo. <tatclass> the keys are like right next to each other.

Page 9: Anti-Forensics AF (PDF)

Memory,Forensics,

•  PE,header,not,needed,aSer,loading,•  Zero,the,header,(RtlZeroMemory),•  Process,con#nues,to,run,•  Analysis,tools,fail,•  Win:,,XP,,,,,,10,,

Page 10: Anti-Forensics AF (PDF)

Memory,Forensics,

•  Completeness:,,winpmem92.1.post4.exe$9o$lol.aff4$$"C:\Program$Files\Rekall\rekal.exe"$9f$lol.aff4$$>$procdump$proc_regex="thekeys",$$$$$$dump_dir="C:/Users/int0x80/Desktop/"$

Page 11: Anti-Forensics AF (PDF)

Memory,Forensics,

•  Demo,–  thekeysarelikerightnexZoeachother$linux,•  LiME,•  Vola#lity,

,

Page 12: Anti-Forensics AF (PDF)

Memory,Forensics,

•  ELF,header,not,needed,aSer,loading,•  Zero,the,header,(memset),•  Process,con#nues,to,run,•  Analysis,tools,fail,,

Page 13: Anti-Forensics AF (PDF)

Memory,Forensics,

•  Completeness:,,git$clone$https://github.com/504ensicsLabs/LiME$$cd$LiME/src/$$make$$sudo$insmod$./lime9$(uname$–r).ko$\$$$"path=/tmp/lol.lime$format=lime"$

Page 14: Anti-Forensics AF (PDF)

Memory,Forensics,

•  Completeness:,,git$clone$https://github.com/volatilityfoundation/volatility$$cd$volatility/$$sudo$python$setup.py$install$

Page 15: Anti-Forensics AF (PDF)

Memory,Forensics,

•  Completeness:,,cd$tools/linux/$$make$$head$module.dwarf$$.debug_info$...$

Page 16: Anti-Forensics AF (PDF)

Memory,Forensics,

•  Completeness:,,sudo$zip$\$$$$volatility/plugins/overlays/linux/Ubuntu1604.zip$\$$$tools/linux/module.dwarf$\$$$/boot/System.map9$(uname$9r)$$python$vol.py$99info$|$grep$^Linux$Volatility$Foundation$Volatility$Framework$2.5$LinuxUbuntu1604x64$9$A$Profile$for$Linux$Ubuntu1604$x64$

Page 17: Anti-Forensics AF (PDF)

Memory,Forensics,

•  Completeness:,,python$vol.py$–f$/tmp/lol.lime$\$$$99profile=LinuxUbuntu1604x64$linux_pslist$$python$vol.py$–f$/tmp/lol.lime$\$$$99profile=LinuxUbuntu1604x64$linux_procdump$\$$$9D$/tmp$9p$<PID>$

Page 18: Anti-Forensics AF (PDF)

Android,(An#$)Forensics,

•  Use,Encryp#on$

Page 19: Anti-Forensics AF (PDF)

Android,(An#$)Forensics,

•  Use,Encryp#on,•  Also,"Use,Tor,,Use,Signal",

Page 20: Anti-Forensics AF (PDF)

Android,(An#$)Forensics,

•  Use,Encryp#on,•  Also,"Use,Tor,,Use,Signal",

Page 21: Anti-Forensics AF (PDF)

Android,(An#$)Forensics,

•  Use,Encryp#on,•  Also,"Use,Tor,,Use,Signal",

Page 22: Anti-Forensics AF (PDF)

Android,(An#$)Forensics,

•  Use,Encryp#on,•  Also,"Use,Tor,,Use,Signal",

Page 23: Anti-Forensics AF (PDF)

Android,(An#$)Forensics,

•  Use,Encryp#on,•  Also,"Use,Tor,,Use,Signal",

Page 24: Anti-Forensics AF (PDF)

Android,(An#$)Forensics,

•  Use,Encryp#on,•  But,first,,a,word,about,Android,forensics,

Page 25: Anti-Forensics AF (PDF)

Android,Forensics,

•  Not,the,easiest,•  Acquisi#on/Imaging,is,a,pain,– Numerous,caveats,– CONFIG_MODULES=y$– Cross$compile,nc$– Different,interfaces,

Page 26: Anti-Forensics AF (PDF)

Android,Forensics,

•  Acquisi#on/Imaging,caveats:,– Power,– Decrypted,– Unlocked$– Rooted,– USB,Debugging,

Page 27: Anti-Forensics AF (PDF)

Android,Forensics,

•  Memory,acquisi#on/imaging,caveats:,– Power,– Decrypted,– Unlocked$– Rooted,– USB,Debugging,– CONFIG_MODULES=y,

Page 28: Anti-Forensics AF (PDF)

Android,Forensics,

•  NAND,acquisi#on,done,with,nc$,adb$devices$adb$push$./nc$/sdcard/nc$adb$forward$tcp:4444$tcp:4444$adb$shell$su$cp$/sdcard/nc$/dev/nc$$chmod$777$/dev/nc$

Page 29: Anti-Forensics AF (PDF)

Android,Forensics,

•  NAND,acquisi#on,done,with,nc$,dd$if=/dev/block/mmcblk0$bs=65535$|$\$

/dev/nc$9nvlp$4444,,nc$9nv$127.0.0.1$4444$>$image.nand$sha256sum$image.nand$cp$9a$image.nand$image.nand.copy,,sha256sum$image.nand*$$

Page 30: Anti-Forensics AF (PDF)

Android,Forensics,

•  NAND,exposed,via,different,interfaces,•  Check,/proc/partitions$– /dev/block/mmcblk*,– /dev/mtd/mtd*,– /dev/mtdblock*$– /dev/emmc*,– /*/*/*/*$no,$comment,

Page 31: Anti-Forensics AF (PDF)

Android,Forensics,

•  Logical,acquisi#on,is,easier,– adb$pull$/$./dump$– adb$shell$dumpsys$&>$./dumpsys.log,– adb$backup$9apk$9obb$9shared$$$9all$9system$$java$9jar$abe.jar$unpack$$$$$<backup.ab>$<backup.tar>$[pin]$

,

Page 32: Anti-Forensics AF (PDF)

Android,Forensics,

•  Logical,acquisi#on,is,easier,– adb$shell$dumpstate$\$$$&>$./dumpstate.log,

– adb$bugreport$&>$./bugreport.log$– aflogical9ose$

Page 33: Anti-Forensics AF (PDF)

Android,Forensics,

•  Complete,forensic,acquisi#on/analysis,sucks,•  Likely,violate,tradi#onal,methodology,•  Easy,to,disrupt,:),

Page 34: Anti-Forensics AF (PDF)

Android,An#$Forensics,

•  Use,Encryp#on,•  Example,scenarios:,,– Raided,by,LE,– Deploying,hardware,implant,– e\_(�)_/e,

Page 35: Anti-Forensics AF (PDF)

Android,An#$Forensics,

•  Use,Encryp#on,•  Easiest,solu#on:,– Power,down,device,– Everything,encrypted,– Lawyer,up,

Page 36: Anti-Forensics AF (PDF)

Android,An#$Forensics,

•  Power,down,if,tampering,detected,•  Leverage,device,sensors,– Bluetooth,– Cellular,– GPS,– Mo#on,– Power,– WiFi,

Page 37: Anti-Forensics AF (PDF)

Android,An#$Forensics,

•  Android,app:,Duck,The,Police,•  Device,asser#ons:,– Encrypted,– Rooted,– Magnets,– Sensors,,

•  DEMO,

Page 38: Anti-Forensics AF (PDF)

Android,An#$Forensics,

•  Use,Encryp#on,•  Example,scenarios:,,– Raided,by,LE,– Deploying,hardware,implant,– e\_(�)_/e,

•  WIN,

Page 39: Anti-Forensics AF (PDF)

SD,Cards,

•  CTF,Time!,

Page 40: Anti-Forensics AF (PDF)

SD,Cards,

•  [SPOILER,PREVENTION,INTENSIFIES],

Page 41: Anti-Forensics AF (PDF)

SD,Cards,

•  sdtool$•  Lock/Unlock,device,•  Physical,lock,disengaged,•  Writes,happen,in,memory,•  Nothing,wriZen,to,device,•  NO,LOGS,,NO,CRIME,

Page 42: Anti-Forensics AF (PDF)

SD,Cards,

•  sdtool,caveats:,– Direct,access,to,MMC,device,required,– Some,USB,hubs,only,expose,mass,storage,• WON'T,WORK,

,

Page 43: Anti-Forensics AF (PDF)

SD,Cards,

•  Example,scenarios:,– Hardware,implant,– PORTAL,of,Pi,(@thegrugq),

•  hZps://github.com/int0x80/notes/wiki/Linux:$PORTAL$of$Pi,,

– AZack,VM,

,

Page 44: Anti-Forensics AF (PDF)

SD,Cards,

•  sdtool:,hZp://www.bertold.org/sdtool/,•  Edit,Makefile,to,use,clang,instead,of,gcc,,sudo$./sdtool$/dev/mmcblk0$status$sudo$./sdtool$/dev/mmcblk0$lock$sudo$./sdtool$/dev/mmcblk0$unlock$

Page 45: Anti-Forensics AF (PDF)

Ques#ons?,

@dualcoremusic,[email protected],