Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 44 guests and 2 members online
 
Free Business and Tech Magazines and eBooks

You are here: Home arrow Resourcesarrow Toolsarrow Ransack Post Exploitation Tool
EH-Net
May 23, 2013, 02:07:08 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Ransack Post Exploitation Tool  (Read 4003 times)
0 Members and 1 Guest are viewing this topic.
sil
Hero Member
*****
Offline Offline

Posts: 549



View Profile WWW
« on: May 03, 2012, 01:12:41 PM »

Ransack Post Exploitation Tool v 0.1 - Ransack is a post exploitation tool to be used by penetration testers. It is more of a proof of concept and its purpose is to grab any information deemed relevant on a system, post root compromise. This information may include config files, ssh keys, ssl keys, or any other information deemed valuable.

After seeing a lot of posts here on finding information for the OSCP exam, I figured I would try to give people something to 1) think about and 2) others to put to use while performing authorized work. As I am a stickler for going against the grain, its a simple shell script. It could have been written in Perl, Python, Ruby or another language but as usual I chose not to. The reasoning for this is logical and simple: There is never a guarantee that a specific programming language will be installed on a machine. If it is not, that would mean I would have to either install it on my own (which raises the detection rate), re-program it to match the system I am on (which again raises the ratio of detection).

Once on a system, there is no guarantee that 1) you will know what to look for 2) will NOT miss something important because you are scrambling to figure out what the system is, what it does and so fort. The goal was to ransack the system for files that are usually valuable. Those files are copied over and tar'd in order to extract and dissect the data on another machine.

Data extracted includes SSL certificates, SSH keys, config files, and so forth. It will also determine who is in a "juicy" (privileged) group and rasack their directories as well. This will include a user who may be in a group such as wheel, mysql and so forth.

Since its simply a shell script, anyone can modify it to look for just about anything and "ransack" that information as well. Most information can aide a pentester since password reuse is rampant, many configuration files will yield other networks and IP addresses and so forth.

Lastly, lest anyone complain about the tool, the tool was released to aid penetration testers. Not assist malicious individuals. The reality of life dictates people will likely use the tool for nefarious purposes. Much similar to a handgun; a police officer may use his weapon to put down someone deemed as a threat (life saving) while someone else may use a handgun to rob a bank. Don't shoot the messenger there is a valid and legitimate purpose for Ransack.

http://www.infiltrated.net/scripts/ransack.sh
sh ransack.sh
Logged

cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #1 on: May 03, 2012, 01:21:07 PM »

Not to be confused with Agent Ransack

http://www.mythicsoft.com/page.aspx?type=agentransack&page=home
Logged

MaXe
Hero Member
*****
Offline Offline

Posts: 669


I've just upgraded myself to a cyborg muahahaa!!1


View Profile WWW
« Reply #2 on: May 03, 2012, 06:23:09 PM »

Looks nice, why don't you use "netstat -antupe" instead though?
It lists everything listening on TCP and UDP interfaces along with process information, ports, etc. Just a suggestion, not really important  Smiley
Logged

I'm an InterN0T'er
sil
Hero Member
*****
Offline Offline

Posts: 549



View Profile WWW
« Reply #3 on: May 04, 2012, 07:27:51 AM »

The overall goal was to keep it symmetric and working across the differing platforms:

Code:
[root@kenji ~]# uname -a
FreeBSD kenji 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Mar 20 10:42:10 EDT 2012     root@kenji:/usr/obj/usr/src/sys/SARU  i386
[root@kenji ~]# netstat -t
netstat: illegal option -- t

-t never works on any BSD nor Solaris and in HPUX it wouldn't work either. I thought about doing if [ uname == $THIS ] then ... But I was lazy and it meant more lines of code. Aside from comments, the entire thing can be streamed into under 25 lines so you can copy it right on a term without raising a bandwidth flag if someone is doing SIEM.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.07 seconds with 23 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Advertisement

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.