Skip to content

Instantly share code, notes, and snippets.

View 4thel00z's full-sized avatar
🧂
don't be cringe boi

ransomware 4thel00z

🧂
don't be cringe boi
View GitHub Profile
@4thel00z
4thel00z / hax.c
Created July 11, 2021 09:49 — forked from apsun/hax.c
Hook main() using LD_PRELOAD
/*
* Hook main() using LD_PRELOAD, because why not?
* Obviously, this code is not portable. Use at your own risk.
*
* Compile using 'gcc hax.c -o hax.so -fPIC -shared -ldl'
* Then run your program as 'LD_PRELOAD=$PWD/hax.so ./a.out'
*/
#define _GNU_SOURCE
#include <stdio.h>
@4thel00z
4thel00z / gcc-security.txt
Created July 11, 2021 09:03 — forked from jrelo/gcc-security.txt
GCC security related flags reference.
Source material:
http://security.stackexchange.com/questions/24444/what-is-the-most-hardened-set-of-options-for-gcc-compiling-c-c
https://wiki.gentoo.org/wiki/Hardened_Gentoo
https://wiki.debian.org/Hardening
================================================================================================================>
GCC Security related flags and options:
CFLAGS="-fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2"
LDFLAGS="-Wl,-z,now -Wl,-z,relro"
@4thel00z
4thel00z / auth.go
Created January 12, 2021 22:51 — forked from ogazitt/auth.go
Auth0 PKCE flow for a CLI built in golang
package auth
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/url"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@4thel00z
4thel00z / web-servers.md
Created November 19, 2020 02:14 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@4thel00z
4thel00z / upload_to_gist.zsh
Last active October 31, 2020 11:17
The intention of this software is to provide a script to upload encrypted data to gist
#
# Licensed under the GPL-3 License
#
# Author: Mohamed Mustapha Tahrioui aka. ransomware aka. 4thel00z ([email protected])
#
# The intention of this software is to provide a script to upload encrypted data to gist for myself
# and others who are interested in using my software non-commercially or commercialy.
#
# The requirements for this script are :
# - base64
#
# Licensed under the GPL-3 License
#
# Author: Mohamed Mustapha Tahrioui aka. ransomware aka. 4thel00z ([email protected])
#
# The intention of this software is to provide a simple go http service boilerplate for myself
# and others who are interested in using my software non-commercially or commercialy.
#
#
#! /bin/bash
@4thel00z
4thel00z / dbus_method.py
Created August 9, 2018 00:24
DBus Method call convenience function
import dbus
def call_dbus(bus :"dbus.SystemBus", service_name:str, object_path:str, member:str, interface_name:str, *args, **kwargs):
"""
This is a convenience function, which you can use to call a DBus method on either Bus (Session/System).
:param bus:
:param service_name:
:param object_path:
:param member: