From e4d613357e613ca491cee83bfb6b6f27946eec28 Mon Sep 17 00:00:00 2001 From: Andras Gemes Date: Thu, 26 Dec 2024 14:55:49 +0100 Subject: [PATCH] chore: drop obsolete files --- Makefile | 8 ------ lab/linux/rs-no-std/main.rs | 46 --------------------------------- lab/linux/rs-no-std/readme.txt | 1 - lab/windows/rsrc/data.txt | 1 - lab/windows/rsrc/version.rc | 32 ----------------------- lab/windows/rsrc/version.res | Bin 902 -> 0 bytes 6 files changed, 88 deletions(-) delete mode 100644 lab/linux/rs-no-std/main.rs delete mode 100644 lab/linux/rs-no-std/readme.txt delete mode 100644 lab/windows/rsrc/data.txt delete mode 100644 lab/windows/rsrc/version.rc delete mode 100644 lab/windows/rsrc/version.res diff --git a/Makefile b/Makefile index 7150d4c..2211161 100644 --- a/Makefile +++ b/Makefile @@ -45,8 +45,6 @@ $(BUILDDIR)/linux/fstat \ $(BUILDDIR)/linux/x64/shexec \ $(BUILDDIR)/linux/x64/shcode_hello \ $(BUILDDIR)/windows/msf-msg.exe \ -$(BUILDDIR)/windows/version.res \ -$(BUILDDIR)/windows/msf-msg-rsrc.exe \ $(BUILDDIR)/windows/shexec.exe \ cargo-build: @@ -161,12 +159,6 @@ $(BUILDDIR)/linux/x64/shcode_hello: arsenal/linux/x64/shcode_hello.s $(BUILDDIR)/windows/msf-msg.exe: lab/windows/shellcode/shc.c x86_64-w64-mingw32-gcc $< -g -o $@ -$(BUILDDIR)/windows/version.res: lab/windows/rsrc/version.rc - x86_64-w64-mingw32-windres $< -O coff -o $@ - -$(BUILDDIR)/windows/msf-msg-rsrc.exe: lab/windows/shellcode/shc.c $(BUILDDIR)/windows/version.res - x86_64-w64-mingw32-gcc $^ -g -o $@ - $(BUILDDIR)/windows/shexec.exe: arsenal/windows/shexec.c x86_64-w64-mingw32-gcc $< -g -o $@ diff --git a/lab/linux/rs-no-std/main.rs b/lab/linux/rs-no-std/main.rs deleted file mode 100644 index 3d1f326..0000000 --- a/lab/linux/rs-no-std/main.rs +++ /dev/null @@ -1,46 +0,0 @@ -#![no_std] -#![no_main] - -use core::arch::asm; - -// x86_64 Linux - -fn write_string(s: &str) { - unsafe { - asm!( - "syscall", - in("rax") 1, // syscall NR - write: 1 - in("rdi") 1, // arg0 - unsigned int fd - stdout: 1 - in("rsi") s.as_ptr(), // arg1 - const char *buf - in("rdx") s.len(), // arg2 - size_t count - out("rcx") _, // clobbered by syscall - out("r11") _, // clobbered by syscall - lateout("rax") _, // return value - ); - } -} - -fn exit(code: usize) { - unsafe { - asm!( - "syscall", - in("rax") 60, // syscall NR - exit: 60 - in("rdi") code, // arg0 - int error_code - options(noreturn) - ); - } -} - -#[no_mangle] -pub extern "C" fn _start() { - let message = "Hello, World!\n"; - write_string(message); - - exit(0); -} - -#[panic_handler] -fn panic(_info: &core::panic::PanicInfo) -> ! { - exit(1); - loop {} -} diff --git a/lab/linux/rs-no-std/readme.txt b/lab/linux/rs-no-std/readme.txt deleted file mode 100644 index 40e6fdb..0000000 --- a/lab/linux/rs-no-std/readme.txt +++ /dev/null @@ -1 +0,0 @@ -rustc --target=x86_64-unknown-linux-musl -C panic=abort -C target-feature=-crt-static -C link-args=-nostdlib main.rs \ No newline at end of file diff --git a/lab/windows/rsrc/data.txt b/lab/windows/rsrc/data.txt deleted file mode 100644 index 11f11f9..0000000 --- a/lab/windows/rsrc/data.txt +++ /dev/null @@ -1 +0,0 @@ -0123456789 diff --git a/lab/windows/rsrc/version.rc b/lab/windows/rsrc/version.rc deleted file mode 100644 index 263bdf7..0000000 --- a/lab/windows/rsrc/version.rc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -VS_VERSION_INFO VERSIONINFO -FILEVERSION 1,0,0,0 -PRODUCTVERSION 1,0,0,0 -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -FILEFLAGS 0x0L -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_APP -FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - BEGIN - VALUE "CompanyName", "My Company\0" - VALUE "FileDescription", "My Application\0" - VALUE "FileVersion", "1.0.0.0\0" - VALUE "InternalName", "myapp\0" - VALUE "OriginalFilename", "myapp.exe\0" - VALUE "ProductName", "My Product\0" - VALUE "ProductVersion", "1.0.0.0\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END - -100 TEXT "data.txt" - diff --git a/lab/windows/rsrc/version.res b/lab/windows/rsrc/version.res deleted file mode 100644 index 3a25f08e0943036963935ee8fd4ae8f0073af2d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 902 zcmZ`&!A`?vCz|>C}nx3J)jlU3@{c zB-CQQ86pG-F<`a;L-d(B!~@2}yeo_g4=yTP9yti3605LqPRs}s_{6`Ejn7kGJ#fKu ze$6kAI<^^S-l-BjMOVE)A&-Fh!bJQTb5F=9AjVJmU2G=uw3#Pjrd50q1+p~@*uw_# zQrApjL*^SM7>~%;SFgz&<%n%6Rs-hLSi@OPy2@2dfjOVKOkY}z9dnkR$a|J}1<-v- z`=ww{)swzouWG%fD&s6ph0oUvyVaKicKOZ0$%}{x*_|PEvd3BH%P});V?nHlo%*+A InrxNl7jUU*Y5)KL