Skip to content

Instantly share code, notes, and snippets.

View ChristianBagley's full-sized avatar

Christian Bagley ChristianBagley

View GitHub Profile
@ChristianBagley
ChristianBagley / pwnd.md
Created October 31, 2017 02:50 — forked from MattKetmo/pwnd.md
pwnd

Tools

  • Metaspoit: Penetration testing software
  • BeEF: The Browser Exploitation Framework
  • PTF: Penetration Testers Framework
  • Bettercap: MITM framework
  • Nessus: Vulnerability scanner
  • AutoNessus: Auto Nessus
  • BDFProxy: Patch Binaries via MITM (BackdoorFactory)
  • Xplico: Network Forensic Analysis Tool (eg. parse pcap file)
from itertools import permutations
def nextBiggest():
inputNumber = str(input('Enter number: '))
for i in sorted(permutations(str(inputNumber))):
nextNumber = int(''.join(i))
if nextNumber > int(inputNumber):
print(nextNumber)
@ChristianBagley
ChristianBagley / tempCon.py
Created September 18, 2017 22:11 — forked from enile8/tempCon.py
Python temp conversion
####################################################################
#Python program to convert temperature from either Fahrenheit to #
#Celsius or vise-versa. This is a very simple function example. #
# #
####################################################################
def convert(temp, unit):
unit = unit.lower()
if unit == "c":
@ChristianBagley
ChristianBagley / cloudy-gamer-launcher.sh
Created June 20, 2017 15:46 — forked from lg/cloudy-gamer-launcher.sh
Easily start/stop Paperspace and Parsec instances
#!/bin/bash
#
# CloudyGamerLauncher by Larry Gadea
# Easily start/stop Paperspace and Parsec instances
#
# Make sure to fill out the variables below. For the machine name, use the
# 8-letter identifier for the machine on Paperspace (ex. PS8RGDUY)
PAPERSPACE_EMAIL=''
PAPERSPACE_PASSWORD=''
@ChristianBagley
ChristianBagley / transfer.fish
Created April 7, 2017 01:20 — forked from nl5887/transfer.fish
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@ChristianBagley
ChristianBagley / transfer.sh
Created April 7, 2017 01:20 — forked from Prajjwal/transfer.sh
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
#!/bin/zsh
# Defines transfer alias and provides easy command line file.
#
# Authors:
# Remco Verhoef <[email protected]>
# Prajjwal Singh <[email protected]>
#
# Dependencies:
# * curl
filename:.npmrc _auth
filename:.dockercfg auth
extension:pem private
extension:ppk private
filename:id_rsa or filename:id_dsa
extension:sql mysql dump
extension:sql mysql dump password
filename:credentials aws_access_key_id
filename:.s3cfg
filename:wp-config.php
@ChristianBagley
ChristianBagley / get_books.py
Created February 12, 2017 20:38 — forked from jheiselman/get_books.py
Download Free O'Reilly eBooks
import requests
import re
from glob import glob # Google this. It's really good!
from os.path import basename, join # Basename removes the path part of a file, returning only the filename. Can also handle urls.
from concurrent.futures import ThreadPoolExecutor # For our concurrent downloads in download_many.
def get_urls(data, pattern):
urls = pattern.findall(data.text)
endings = ['.pdf', '.mobi', '.epub']

"Give Me CRX" (https://chrome.google.com/webstore/detail/give-me-crx/acpimoebmfjpfnbhjgdgiacjfebmmmci) contains a virus hidden in the source code.

Hidden Virus

Reviewer "Adam Carbonell" (link) first discovered existence of the malware. He mentioned that icon2.png contains malicious code.

bg.js (last modified 11/11/2016) extracts the code by reading icon2.png (last modified 11/10/2016) as text, extracting data between init> and <end strings (I assume a PNG comment), and xor-ing it with char ^ 77.

The resulting text is then run as Javascript. I think around 24 hours after extension installation, every tab will have <script src='hXXp//s3.eu-central-1.amazonaws.com/forton/give_me_crx.js'> injected whenever "chrome.tabs.onUpdated".

@ChristianBagley
ChristianBagley / appify
Created August 24, 2016 04:16 — forked from mathiasbynens/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh