initial commit via gitinitshit
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
# nuke_me_NOW
|
||||||
|
For immediate irrecoverable destruction of running Linux OS using cryptsetup
|
||||||
|
**THIS TOOL WILL IMMEDIATELY AND IRRECOVERABLY DESTORY ALL DATA ON THE CRYPT LVM WITHOUT ASKING TO CONFIRM, AND AS ASSEMBLED, SHOULD BE ABLE TO RUN AS ROOT BY ANY USER WITH EXECUTE PERMISSIONS ON IT**
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
as -o poweroff_aarch64.o poweroff_aarch64.s
|
||||||
|
ld -o poweroff_aarch64 poweroff_aarch64.o
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
nasm -f elf64 -o poweroff_x86_64.o poweroff_x86_64.asm
|
||||||
|
ld -o poweroff_x86_64 poweroff_x86_64.o and linkx86_64.snasm -f elf64 -o poweroff_x86_64.o poweroff_x86_64.asm
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
rm -f *.o 2>/dev/null # object files
|
||||||
|
rm -f *.out 2>/dev/null
|
||||||
|
rm poweroff_aarch64 2>/dev/null
|
||||||
|
rm -f build_poweroff_x86_x64 2>/dev/null
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
.global _start
|
||||||
|
.text
|
||||||
|
|
||||||
|
_start:
|
||||||
|
// Arguments are passed in registers x0 through x7 for AArch64.
|
||||||
|
// sys_reboot magic constants
|
||||||
|
mov x0, #0xfee1dead
|
||||||
|
mov x1, #0x28121969
|
||||||
|
|
||||||
|
// The Linux constant LINUX_REBOOT_CMD_HALT
|
||||||
|
mov x2, #0xcdef0123
|
||||||
|
|
||||||
|
// The fourth argument (x3) is optional, so set it to 0.
|
||||||
|
mov x3, #0
|
||||||
|
|
||||||
|
// The syscall number for sys_reboot on AArch64 is 169.
|
||||||
|
// The syscall number is placed in the X8 register.
|
||||||
|
mov x8, #169
|
||||||
|
|
||||||
|
// Execute the syscall.
|
||||||
|
svc #0
|
||||||
|
|
||||||
|
// This code should not be reached.
|
||||||
|
// If it is, exit with a status code.
|
||||||
|
// sys_exit is syscall number 93 on AArch64.
|
||||||
|
mov x8, #93
|
||||||
|
mov x0, #1
|
||||||
|
svc #0
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
section .text
|
||||||
|
global _start
|
||||||
|
|
||||||
|
_start:
|
||||||
|
; The sys_reboot system call has the number 169.
|
||||||
|
mov rax, 169
|
||||||
|
|
||||||
|
; Argument 1: RDI
|
||||||
|
; Linux REBOOT_MAGIC1 constant
|
||||||
|
mov rdi, 0xfee1dead
|
||||||
|
|
||||||
|
; Argument 2: RSI
|
||||||
|
; Linux REBOOT_MAGIC2 constant
|
||||||
|
mov rsi, 0x28121969
|
||||||
|
|
||||||
|
; Argument 3: RDX
|
||||||
|
; LINUX_REBOOT_CMD_HALT constant
|
||||||
|
mov rdx, 0xcdef0123
|
||||||
|
|
||||||
|
; Argument 4: R10
|
||||||
|
; Zero out the optional fourth argument.
|
||||||
|
xor r10, r10
|
||||||
|
|
||||||
|
; Call the syscall.
|
||||||
|
syscall
|
||||||
|
|
||||||
|
; The program should not reach here.
|
||||||
|
; Exit with an error code as a fallback.
|
||||||
|
mov rax, 60
|
||||||
|
mov rdi, 1
|
||||||
|
syscall
|
||||||
Reference in New Issue
Block a user