Quantcast
Channel: windows deep internals
Browsing all 264 articles
Browse latest View live

jitted eBPF code

I add yesterday disasm for jitted eBPF code. To put it mildly this code is very poorEvery function has 7 bytes of nops in prolog. Comment says that this is for BPF trampoline - well, okLots of code...

View Article


overhead of eBPF JIT

Lets try to estimate overhead of JIT compilerI wrote simple perl script - it just counts redundant bytes for several cases:pair mov reg, rbp/add reg, imm (total length 7 bytes) can be replaced with lea...

View Article


plugin for Binary Ninja

due to the sad fact that IDA Pro moving to cloud (just think about confidentiality) I decided to look at some alternatives - Binary Ninja. First impression was terribletotally unknown API, guys - why...

View Article

ida pro plugin for unpacking lzma compressed linux kernel

UOS linux for mips64 contains strange linux kernel which cannot be unpacked with famous extract-vmlinuxLets see what happens:zimage_start = (unsigned long)(&__image_begin);zimage_size = (unsigned...

View Article

ida pro plugin to handle loongson elf relocs

It seems that you can't just go ahead and implement your own proc_def_t for processor module - bcs ida pro sdk don`t include needed symbols, you will just get something like1>reg.obj : error...

View Article


reversing of sunway sw64 ISA

It seems that Chinese are hiding information about their another homemade processor sw64 - try to find some technical details with google, baidu or gitee. At the same time they ported linux on this...

View Article

position independent sw64 code

lets see how PIC looks like for sw64 on the example of a function from libLLVM-7.so.1 (huge shared library - size 45Mb):1000ED0   ldih    GP, PV, 0x1D3PV almost always contains address of called...

View Article

epbf maps

As you can see from function bpf_map_alloc_id all bpf maps stored in balanced tree map_idr and synced on spinlock map_idr_lock. No surprise that you can`t view them in user-mode - there is bpf command...

View Article


ebpf opcodes patching

I made today disasm for eBPF opcodes. Lets see how they looks like:85 00 00 00 C0 10 02 00 call 0x210C0in jitted code this is call 0xffffffffb4c14110. ffffffffb4c14110 - 210C0 = FFFFFFFFB4BF3050,...

View Article


pmu events

Some detailspmu stored in tree pmu_idr and synced with mutex pmus_lock. and as usually can be used to blind EBPF. How? Lets see:General speaking there are usually four steps involved to attach an eBPF...

View Article

verification of jitted ebpf code

There are some projects for ebpf in usermode, but for verification purposes you need the same code which was used in kernel. So I ripped out some jit code to run it in...

View Article

size of ebpf jit code on different processors

it doesn't make much sense but bcs I have now several jit compilers - why not compare how much size have jitted code for different processors?I chose 3 ebpf programssimple BPF_PROG_TYPE_CGROUP_SKB with...

View Article

PoC to blind pamspy

Lets disasm jit code from this spyware: [8] prog 0xffffb02dc0133000 id 160 len 46 jited_len 215 aux 0xffff8ccb58fab400 used_maps 1 used_btf 0 func_cnt 0     tag: 0F 86 19 76 BC 37 68 B3  stack_depth:...

View Article


dirty secrets of ld.so

As you can know you can set library path under linux with several ways:envvar LD_LIBRARY_PATH, but it can be removed somewhere inside program so /proc/pid/environ is useless (as usually they expose via...

View Article

BTI incompatible exported functions in kernel 5.15.0-53

if BTI is enabled, the first instruction encountered after an indirect jump must be a special BTI instructionfrom hereI downloaded Ubuntu for arm64 (jammy-desktop-arm64.iso) and decided to check if...

View Article


linux drivers cross-compilation

Just reminder for myself how to build driver for arm64 having x64 based machine with ubuntuInstall right gccfor arm64 we need gcc-aarch64-linux-gnu:sudo apt-get install gcc-aarch64-linux-gnuBuild...

View Article

timers in linux kernel

timers are very important artifact for forensics, for example Volatility even has plugin to dump timers from windows kernel. Unfortunately Volatility cannot dump timers from linux kernel so I made such...

View Article


Image may be NSFW.
Clik here to view.

dwarfdump

I made pale analog of world famous pdbdump to dump types and functions from DWARF. Before introducing my tool I have several words about DWARF - it is excess, compiler-specific, inconsistent and...

View Article

DWARF size overhead

I made today simple script to estimate size overhead due types duplication. This is hard task for C++ - bcs some types can have specialized (or partially specialized) template parameters and sure this...

View Article

custom dwarf attributes in golang

Finally I found them0x2900DW_AT_go_kind, form DW_FORM_data1. Internal golang types kind. For example DW_TAG_structure_type can have kind Struct, Slice or String. I made script to extract statistic...

View Article
Browsing all 264 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>