Skip to content

Instantly share code, notes, and snippets.

View febnug's full-sized avatar
🥴
Drunk

Febriyanto Nugroho febnug

🥴
Drunk
View GitHub Profile
<?php
// Taken from : https://gist.github.com/ammarfaizi2/ac9639359a1f315f0aedc6a4bbbc60fb
$strings = [
"/bin/sh"
// "Enter Password: ",
// "Enter Password 2: ",
// "Enter Password 3: ",
// "Wrong Password!\n",
@febnug
febnug / shell.c
Last active June 4, 2021 10:46
redirect function pake shellcode
// solusi yang saya tulis di :
// https://stackoverflow.com/questions/59536438/calling-x86-local-function-using-shellcode
#include <stdio.h>
#include <string.h>
void redirect() {
FILE *out = fopen("redirect.txt", "w");
fprintf(out, "REDIRECT WORKED");
fclose(out);
int timings[64*N];
int main(void)
{
int i;
__asm__ __volatile__ (
"lea edx, [timings] \n\t"
"rdtsc \n\t"
".rept 32 \n\t"
@febnug
febnug / compiling_asm.md
Created October 26, 2019 11:29 — forked from yellowbyte/compiling_asm.md
how to assemble assembly with NASM assembler to 32-bit or 64-bit ELF binary with or without libc

32-bit ELF binary

how to assemble and link:

nasm -f elf32 -o <filename>.o <filename>.asm
ld -m elf_i386 -o <filename> <filename>.o

template code (hello world):

section .text
global _start