Thursday, April 30, 2015

(Metasploit) Clear console history

This is going here just so I don't have to go looking for it again.
I was trying to figure out how to clear the Metasploit command history to have a fresh msfconsole experience. It turns out that it is stored in the /root/.msf4/history file.

So we check the file sizes of the history and log files using tree -ha
















and clear them out.

echo "" > /root/.msf4/history

Done

Tuesday, April 28, 2015

(ASA5512) No ASDM connection

Thanks for this one Cisco :(

The symptoms of this particular problem threw me a little because ssh worked fine but ASDM just showed "Page not Found" or some such crap. Now I wanted to do some clean up on this box any way so I

erase disk0:/
format disk0:/

re-uploaded the core files.

asa912-smp-k8.bin
asdm-713.bin
csd_3.5.2008-k9.pkg
anyconnect-win-2.5.2014-k9.pkg

When it came back up I entered the license key and it still did not work >:(

So anyway, here is the fix.

Add these two lines in config# mode:
ssl encryption aes128-sha1 
ssl encryption 3des-sha1


The issue is described in the ASDM manual:




Monday, April 20, 2015

Friday, April 17, 2015

(OSX) lsof -i [View PID associated with a socket]

Just a note, I need to putz with this. It looks better than netstat-nao | grep tcp. 

lsof -i 

(OSX) GeoLocation of an IP address from the command line.


So I was trying to figure out an easy way to get a GeoLocation from an IP address. I wanted a one liner that could get the info instead of having to go to a web page.

The info.io web site did the trick. It outputs in json format.


curl ipinfo.io/<ip address>


EX:












Powershell:

(Invoke-WebRequest http://ipinfo.io/<ip address>/json).Content


EX: