Annotate DemoVirus sources, add 31-Dec payload, document the push/ret trick #1
Loading…
Reference in a new issue
No description provided.
Delete branch "annotate-and-payload"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Turns the terse 1991 Hack-Tic DemoVirus listing into a documented, buildable, extended project.
tic.asmMASM/TASM,tic_nasm.asmNASM): every instruction commented with register state and intent.LODSB/STOSB/LOOPstub at PSP00FCandrets into it to slide the original program down to0100hand run it.mov word ptr [bx]pokes are plain data writes and howpush bx/retis abused as a disguised indirect jump.len, so it rides into every infected file;lengrows 0x6D -> 0x8F (TIC.COM now 144 bytes).Rebuilt and verified: reproducible from
tic_nasm.asm, infection signature byte stillBE.🤖 Generated with Claude Code
Add a README subsection ("The sneaky bit") to the host-handoff walk-through explaining how the hand-built stub is executed: the mov word ptr [bx] pokes are plain data writes, and `ret` is abused as a disguised indirect jump (push 00FCh, pop into IP) so the CPU begins decoding the just-written bytes as code. Covers the little-endian byte order and why the stub ends at 00FF so control falls through into the relocated host at 0100h with no jmp. Also tidy a one-space comment alignment in tic.asm. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>