Skip to content

Instantly share code, notes, and snippets.

View todb-r7's full-sized avatar

Tod Beardsley todb-r7

View GitHub Profile
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On or around March 31, 2015, if you are a registered user of
the Rapid7 Community at community.rapid7.com, you will notice
that your password will be automatically expired out, you
will get a password reset notification from community@rapid7.com,
and you will notice some significant changes on the site.
This is not a trick. We have not suffered a redirection
@todb-r7
todb-r7 / r7-2015-05-advisory.md
Last active August 29, 2015 14:18
Ceragon FibeAir IP-10 SSH Private Key Exposure (CVE-2015-0936)

Ceragon FibeAir IP-10 SSH Private Key Exposure (CVE-2015-0936)

Product Description

Ceragon produces a series of ruggedized, microwave backhaul devices used to provide connectivity to mobile, IP-based devices; usually, these devices are found in either large industrial environments, or installed on towers to provide "middle-mile" connectivity to mobile customers on behalf of ISPs. In other words, a FibeAir IP-10 typically act as a router of IP traffic. A compromise on these devices can expose the

@todb-r7
todb-r7 / .gitconfig
Created March 2, 2012 19:14
Running arbitrary commands in git aliases to list names of changed files on a pull -r
[alias]
thisbranch = !"git branch --no-color | sed -e '/^[^*]/d' -e 's/* //' "
pull-names = !"git fetch && \
echo 'Checking for diffs...' && \
git diff --name-only origin/`git thisbranch` && \
git pull -r origin `git thisbranch`"
@todb-r7
todb-r7 / git-add-remote.sh
Created March 23, 2012 16:39
bash script to add a remote branch of Metasploit
function git-add-remote {
git remote add $1 git://github.com/$1/metasploit-framework
git fetch $1
git branch --track $1 $1/master
}
@todb-r7
todb-r7 / console-screen.txt
Created March 28, 2012 17:00
Proxy patch busts all of http
=[ metasploit v4.3.0-dev [core:4.3 api:1.0]
+ -- --=[ 819 exploits - 461 auxiliary - 144 post
+ -- --=[ 249 payloads - 27 encoders - 8 nops
msf > use auxiliary/scanner/http/crawler
msf auxiliary(crawler) > show options
Module options (auxiliary/scanner/http/crawler):
Name Current Setting Required Description
@todb-r7
todb-r7 / yaml-example.rb
Created April 15, 2012 21:26
Ruby 1.9.3 standard YAML makes me a sad panda
1.9.3p125 :004 > YAML::VERSION
=> "1.2.2"
1.9.3p125 :005 > a = "foo"
=> "foo"
1.9.3p125 :007 > a.force_encoding("BINARY")
=> "foo"
1.9.3p125 :008 > a.encoding
=> #<Encoding:ASCII-8BIT>
1.9.3p125 :009 > YAML.dump(a)
=> "--- !binary |-\n Zm9v\n"
@todb-r7
todb-r7 / all_cats_are_grey.sh
Created May 14, 2012 21:41
All cats are grey
# Stick in your .bash_aliases to uncolor your Rails logs. Note that ^[ is really (Ctrl-V) + (ESC)
function all_cats_are_grey {
cat $1 | sed 's/^[\[[0-9;]*m//g'
}
@todb-r7
todb-r7 / debug-notes.txt
Created May 17, 2012 19:29
Troubleshooting some rails memory leak
The problem: the first seven hosts of the poisoned nmap file gets you to 10.3 to 10.5% mem usage (for 8gb memory) from the sample file.
The first order of business is to get a sample file to be usable for test cases without actually crashing ruby, and to make the host info more useful for debugging (sequential IPs, fake target domain and names, basic attempts at anonymizing the real data).
top - 10:51:26 up 59 min, 7 users, load average: 0.46, 0.57, 0.47
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.8%us, 4.0%sy, 0.0%ni, 92.1%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 8161728k total, 3880048k used, 4281680k free, 341184k buffers
Swap: 9535480k total, 0k used, 9535480k free, 1092928k cached
@todb-r7
todb-r7 / pulls.sh
Created May 31, 2012 19:48
How I land pull requests
git checkout master
git pull -r
git checkout $remote/$branch
git rebase master # Ensure it'll merge cleanly
git checkout -b Pull$number
git diff master # Eyeball the diff locally.
git log -1 | grep Author
git checkout master
git merge --squash Pull432 # Wrap it up into one commit.
git commit --author="$author_name_and_email" # Give author credit.
@todb-r7
todb-r7 / .bash_aliases
Created September 26, 2012 14:21
git-add-remote
function git-add-remote {
git remote add -f $1 git://github.com/$1/metasploit-framework
git branch --track $1-master $1/master
}