Skip to content

Instantly share code, notes, and snippets.

View cedriczirtacic's full-sized avatar
🐗
æ

cedric cedriczirtacic

🐗
æ
View GitHub Profile
@cedriczirtacic
cedriczirtacic / ddclient.service
Last active May 3, 2024 20:24
Systemd ddclient.service
#/usr/lib/systemd/system/ddclient.service
[Unit]
Description=ddclient Service
After=network.target
[Service]
Type=forking
PIDFile=/var/run/ddclient.pid
ExecStart=/sbin/ddclient -pid /var/run/ddclient.pid -file /etc/ddclient/ddclient.conf -daemon 300
ExecStop=/usr/bin/pkill -SIGKILL -P /var/run/ddclient.pid
@cedriczirtacic
cedriczirtacic / hexe1
Created February 27, 2018 19:50
redballoonsecurity.com challenges
6554 6c6c 6d20 2065 6261 756f 2074 6f79
7275 6620 7661 726f 7469 2065 6168 6b63
202e 6633 7033 6a39 6f66 6666 3961 646a
6c73 7333 7240 6465 6162 6c6c 6F6F 736e
6365 7275 7469 2e79 6f63 0a6d 540d 6C65
206C 656d 6120 6f62 7475 7920 756F 2072
6166 6f76 6972 6574 6820 6361 2e6b 3320
3366 3970 666a 666F 6166 6a39 7364 336C
4073 6572 6264 6c61 6f6c 6e6f 6573 7563
6972 7974 632e 6d6F 0d0a

Compile steghide in macOS X

Check if gettext is installed, if not use Homebrew to get it:

$ brew install gettext

Get the gettext library and cpp flags, and configure with those flags:

$ brew info gettext | grep FLAGS
@cedriczirtacic
cedriczirtacic / vm_admin.sh
Last active April 11, 2022 21:27
quick VBox (headless) admin script
#!/bin/bash
# cedric
# XXX: this is how I prefer to stop a VM, change this at will
PREFERRED_STOP_METHOD="acpipowerbutton"
function perror() { echo -e $@ 1>&2; }
function vm_exists() {
local VM=$1
VBoxManage showvminfo "${VM}" >/dev/null 2>&1
return $?
#!/bin/bash
# TOR Setup Script
# Author: Nick Busey
#
# This file is meant to get SSH access via Tor to an Ubuntu server in one command.
#
# Quick Usage (as root): $ bash <(curl -s https://gitlab.com/grownetics/devops/raw/master/tor_ssh.sh)
#
# Usage for the paranoid:
@cedriczirtacic
cedriczirtacic / wol.py
Created February 12, 2019 16:11
wake-on-lan using scapy
from scapy.sendrecv import send
from scapy.layers.inet import *
from binascii import unhexlify
import sys
magic = ''
for h in sys.argv[1].split(':'): magic += unhexlify(h);
send(IP(dst="255.255.255.255")/UDP(dport=9)/Raw(load=(chr(0xff)*6 + magic*16)))
@cedriczirtacic
cedriczirtacic / decrypt_main.py
Created September 3, 2020 21:27
HTB/headache
import sys
path = sys.argv[1]
main_addr = 0x1faf
main_size = 1749
main_real = ''
main = ''
key = "a15abe90c112d09369d9f9da9a8c046e"
key_len = len(key)
@cedriczirtacic
cedriczirtacic / poly.sh
Created February 28, 2018 22:13
TAR + perl
#!/bin/bash
perl='print(qx{id});#'
touch $perl && echo "this is a normal file" > $perl
tar -vcf normal.tar $perl
file normal.tar
@cedriczirtacic
cedriczirtacic / attributes.rb
Created April 20, 2019 23:34 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
#!/usr/bin/python
import logging
from angr import *
from pwn import log
'''
[0x00001080]> afl~com
0x00001173 3 110 sym.comprueba_0
0x000011e1 3 112 sym.comprueba_1
0x00001251 3 116 sym.comprueba_2