🎯
Focusing
engineer/applied math :: part-time SRE/full-time CISO
-
NetRoadshow
- Portland, OR, US
-
21:25
(UTC -08:00) - mbijon.wordpress.com
- @geekcode
Pinned Loading
-
Ruby AES Encryption using OpenSSL
Ruby AES Encryption using OpenSSL 1#!/usr/bin/env ruby
2require "openssl"
3require 'digest/sha2'
4require 'base64'
5 -
rbenv ubuntu server cheatsheet
rbenv ubuntu server cheatsheet 1## ubuntu server with bash shell
23git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
4echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
5echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
-
Syslog nginx without $ or patching, ...
Syslog nginx without $ or patching, http://syshero.org/post/68174083489/nginx-syslog-ing-without-breaking-the-bank-or-patching (1) directory/fifo structure: mkdir -p /srv/logs/ mkfifo /srv/logs/access.log mkfifo /srv/logs/error.log (2) nginx conf: error_log /srv/logs/error.log; access_log /srv/logs/access.log; (3) remember to start syslog-ng before nginx! 1source s_nginx_20 { pipe("/srv/logs/access.log" program_override("nginx-access-log")); };
2source s_nginx_21 { pipe("/srv/logs/error.log" program_override("nginx-error-log")); };
34filter f_nginx_20 { match("nginx-access-log" value("PROGRAM")); };
5filter f_nginx_21 { match("nginx-error-log" value("PROGRAM")); };
-
XSS filtering in PHP (cleans various...
XSS filtering in PHP (cleans various UTF encodings & nested exploits) 1<?php
2/*
3* XSS filter, recursively handles HTML tags & UTF encoding
4* Optionally handles base64 encoding
5*
-
Bash stuff for fighting a weak DOS a...
Bash stuff for fighting a weak DOS attack 1# Here a few bash one-liners that helped me analyze / fight a weak DOS attack against debuggable.com. Mostly for future reference.
2# The attacker was opening lots of tcp connections without sending data, I believe it's called a SYN flood, see: http://tools.ietf.org/html/rfc4987#section-3.2
34# Step 0: Check what is going on at port 80
5$ netstat -tan | grep ':80 ' | awk '{print $6}' | sort | uniq -c
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.