Saltar al contenido ForoHackers

hexdump_hermit

Se unió el 23 julio 2023

Mensajes en el foro

  1. Respondió en Why traceroute shows * * * and why that is usually fine

    Another trap: with load balancing across equal-cost paths, consecutive probes can follow different routes, so the hops printed may not form one actual path. Also try TCP-based probes to the port you …

  2. Respondió en Reading a flash chip in circuit: why the board keeps fighting you

    Three reads, three `sha256sum`s. If two agree and one does not, trust the two and fix your contact. If all three differ, it is the clip or the power, never the chip.

  3. Respondió en Android's app sandbox is just Linux users (and I think that is neat)

    Check `adb shell id` on a stock device: you are `shell`, not root. Inspecting the sandbox is a good exercise precisely because you can see it hold.

  4. Respondió en CTF warm-up: read a stack frame and the vulnerability stops being magic

    Add `-fno-omit-frame-pointer` if you want `rbp` chains in optimized code. Otherwise offsets from `rsp`. Same picture, different register.

  5. Respondió en How does read() on /dev/hello actually reach my driver function?

    Chain: `open()` finds the inode of `/dev/hello`, the misc layer looks up your `miscdevice` by minor number and puts your `file_operations` into `file->f_op`. After that, `read()` goes `ksys_read` -> …

  6. Respondió en Cómo funciona un ensamblador de dos pasadas (con un trozo de Z80 a mano)

    For the record, the bytes check out: `3A` is `ld a,(nn)`, `32` is `ld (nn),a`, `C3` is `jp nn`, `3C` is `inc a`. Little-endian address as stated. Nice example.

  7. Respondió en +++ : why the Hayes escape sequence needed a second of silence

    Escape sequence in practice: `2B 2B 2B`, then one second of nothing. Nothing is the byte that matters.

  8. Respondió en WebAssembly memory is just one big ArrayBuffer (y por qué se te rompe al hacer grow)

    Worth adding: "detached" is the right word. The bytes still exist in the new buffer. The old object is a husk with length zero. Reading from it does not fault, which is what makes it so confusing to …

  9. Respondió en Hi, I teach assembly through CTF puzzles

    x86-64 first, because that is what most people will meet. A smaller RISC afterwards for contrast. Start with functions where `eax` is set at the end, so the answer is visible.

  10. Respondió en Puzzle: a program that prints its own length

    Python, same trick: ```python s='s=%r;print(len(s%%s))';print(len(s%s)) ``` `s%s` rebuilds the whole source line, so `len` of it is the length. Prints 41 here. Edit the program and the number follo…

  11. Respondió en Puzzle: find the duplicate in an array of n+1 numbers

    Spoiler, code: ```c int find_dup(const int *a, int n) { int slow = a[0], fast = a[a[0]]; while (slow != fast) { slow = a[slow]; fast = a[a[fast]]; } slow = 0; while (slow != fast) { …

  12. Respondió en Mirando el firmware de mi propio router: la entropía te dice qué es cada trozo

    Good methodology. One caution: entropy near 1 does not separate compressed from encrypted, as you say, but the *header* does. A compressed block starts with a recognisable magic (LZMA, gzip, zlib). A…

  13. Respondió en What each exploit mitigation really takes away (CTF edition)

    Add `-fstack-protector-strong` versus `-fstack-protector-all` to the lab list. The "strong" heuristic does not protect every function, only those with arrays or address-taken locals. Seeing which fun…

  14. Respondió en Practice crackme: when the check is a XOR table, invert it, do not brute force it

    Find the table first: `strings -t x` will not show it (not printable), but a hex view of `.rodata` next to the function's `lea` will. Then the answer falls out in one line. Also look at the 12th byte…

  15. Respondió en I created the record, but my resolver insists it does not exist

    Also visible on the wire: the NXDOMAIN response carries the SOA in the authority section precisely so the resolver can compute that negative TTL. No SOA in the answer, no negative caching (or a very …

  16. Respondió en Adding the same floats in a different order gives a different answer

    Historic footnote: on 32-bit x86 builds using the x87 unit, intermediate sums were held in 80-bit registers, so the same C source could give yet another answer depending on whether a value was spille…

  17. Inició Finding the load address of a raw Cortex-M firmware dump

    You dumped the flash of **your own** board and got a raw `.bin` with no ELF header, no symbols, no load address. Where do you start? With the vector table, which sits at the beginning of the image on…

  18. Respondió en Hello. Your compiler is smarter than your loop, and it is right.

    Check it in the output: `gcc -O2 -S` on that function gives `mov eax, 1; ret`. No comparison left. The assembly does not argue.

  19. Respondió en HTTP/2 over TCP vs HTTP/3 over QUIC: the head-of-line blocking story

    To see it live: compare a transfer on a link with 2% loss using `tc netem` between two lab machines. The HTTP/2 curve collapses sooner. Netem is for your own lab, obviously.

  20. Respondió en Cold joints: how to tell and how to stop making them

    Add a continuity beep while you wiggle. A joint that intermittently beeps is your answer.

  21. Respondió en Spotting djb2 inside a practice crackme (my cat helped)

    Correct. And `0x0002b5e3` is small enough that the loop probably never overflowed for a short input, so you can reason about the length too. Nice detail.

  22. Respondió en Order of volatility: what to capture first and why

    Hash twice. Before analysis, after analysis. Same value or the image is not the image.

  23. Respondió en Why your ISR flag needs volatile (and why volatile is not enough)

    Easy to confirm: compile with `-O2`, disassemble. Without `volatile` the loop is a single `jmp .` (or a `b .` on ARM) after one load. With it, you get a load inside the loop. Two minutes, convincing.

  24. Respondió en A 4-bit counter in Verilog, and what the tools turn it into

    Also: `rst` is synchronous here (inside the clocked block). Plenty of designs want an asynchronous reset, written `always @(posedge clk or posedge rst)`. Different hardware, different timing. Worth k…

  25. Respondió en Packet radio: when hams ran their own network with AX.25

    Frame check for the curious: the HDLC-style frame ends with a 16-bit CRC, and bit-stuffing keeps the flag byte `0x7E` from appearing inside the payload. Same family as the frames in PPP and old X.25 …

  26. Respondió en SECDED explained with a 7-bit example (Hamming(7,4))

    The mnemonic that made it stick for me: position `n` is covered by exactly those parity bits that appear in the binary expansion of `n`. Position 6 is `110`, so it is covered by `p4` and `p2`. That i…

  27. Respondió en Why does a dynamic array double its size? (amortized cost)

    Related: hash tables resize the same way, with the extra cost of rehashing every key. Same geometric argument, bigger constant.

  28. Respondió en Why coverage-guided fuzzing finds what random input never will

    Yes. The compiler inserts a small counter update at each branch (or edge between basic blocks). After the run, the fuzzer reads the counters. Different edges hit equals "new behaviour".

  29. Inició Why coverage-guided fuzzing finds what random input never will

    A toy target to show the idea: ```c int parse(const uint8_t *buf, size_t len) { if (len >= 4 && buf[0] == 'F' && buf[1] == 'U' && buf[2] == 'Z' && buf[3] == 'Z') { crash_here(); …

  30. Respondió en A quine in one line

    The general recipe works in any language with strings and print: write `A` (code that prints a string `D` twice, once as data, once as code), where `D` describes `A`. Kleene's recursion theorem says …