bug/bundler_fix
jvazquez-r7 2013-03-26 11:21:16 +01:00
commit ae56bc0b37
7 changed files with 38 additions and 7 deletions

View File

@ -12,6 +12,8 @@ License: BSD-3-clause
# #
# This license does not apply to third-party components detailed below. # This license does not apply to third-party components detailed below.
# #
# Last updated: 2013-Mar-25
#
Files: data/john/* Files: data/john/*
Copyright: 1996-2011 Solar Designer. Copyright: 1996-2011 Solar Designer.

Binary file not shown.

View File

@ -295,6 +295,9 @@ public class DbConnectDialog extends OptionsDialog {
} }
/** Tries to connect to the database with given credentials */ /** Tries to connect to the database with given credentials */
private boolean tryConnect() throws MsfException{ private boolean tryConnect() throws MsfException{
Map status = (Map) rpcConn.execute("db.status");
if(status.containsKey("db"))
return true; // already connected
HashMap opts = new HashMap(); HashMap opts = new HashMap();
addNonempty("host", hostField, opts); addNonempty("host", hostField, opts);
addNonempty("port", portField, opts); addNonempty("port", portField, opts);

View File

@ -171,7 +171,7 @@ public class MainFrame extends FrameView {
MsfguiApp.shuttingDown = true; MsfguiApp.shuttingDown = true;
if(choice == JOptionPane.YES_OPTION) if(choice == JOptionPane.YES_OPTION)
rpcConn.execute("core.stop"); rpcConn.execute("core.stop");
else if(choice == JOptionPane.NO_OPTION) else if(choice == JOptionPane.NO_OPTION && rpcConn.username.length() > 0)
rpcConn.execute("auth.logout"); rpcConn.execute("auth.logout");
} catch (Exception ex) { } catch (Exception ex) {
} }

View File

@ -3,7 +3,10 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.FocusEvent; import java.awt.event.FocusEvent;
import java.awt.event.FocusListener; import java.awt.event.FocusListener;
import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.Map; import java.util.Map;
import javax.swing.JFileChooser; import javax.swing.JFileChooser;
@ -120,6 +123,19 @@ public class OpenConnectionDialog extends javax.swing.JDialog {
} catch (NullPointerException nex) {//generated when attributes dont exist. } catch (NullPointerException nex) {//generated when attributes dont exist.
} catch (Exception ex) { //for weird msg exceptions } catch (Exception ex) { //for weird msg exceptions
} }
//Try service token on default 3790
BufferedReader fin = null;
try{
try{
fin = new BufferedReader(new FileReader(MsfguiApp.getMsfRoot().getParent()+"/apps/pro/engine/tmp/servicekey.txt"));
}catch(Exception iox2){
fin = new BufferedReader(new FileReader("/opt/metasploit/apps/pro/engine/tmp/servicekey.txt"));
}
RpcConnection rpc = RpcConnection.getConn("", fin.readLine().toCharArray(), "localhost", 3790, true);
if(javax.swing.JOptionPane.showConfirmDialog(null, "Connect to local rpcd?") == javax.swing.JOptionPane.YES_OPTION)
return rpc;
}catch(Exception iox){//file not found/unreadable/bad creds/etc. - ignore
}
//Darn. open the gui anyway //Darn. open the gui anyway
OpenConnectionDialog diag = new OpenConnectionDialog(true, mainframe); OpenConnectionDialog diag = new OpenConnectionDialog(true, mainframe);
diag.setVisible(true); diag.setVisible(true);

View File

@ -84,9 +84,15 @@ public abstract class RpcConnection {
String message = ""; String message = "";
try { try {
connect(); connect();
Map results = (Map)exec("auth.login",new Object[]{username, this.password}); if(username == null || username.equals("")){
rpcToken=results.get("token").toString(); rpcToken = this.password;
haveRpcd=results.get("result").equals("success"); execute("core.version"); //throws error if unsuccessful
haveRpcd = true;
}else{
Map results = (Map)exec("auth.login",new Object[]{username, this.password});
rpcToken=results.get("token").toString();
haveRpcd=results.get("result").equals("success");
}
} catch (MsfException xre) { } catch (MsfException xre) {
message = xre.getLocalizedMessage(); message = xre.getLocalizedMessage();
} catch (IOException io){ } catch (IOException io){

View File

@ -8,7 +8,7 @@ session = client
@@exec_opts = Rex::Parser::Arguments.new( @@exec_opts = Rex::Parser::Arguments.new(
"-h" => [ false, "Help menu." ], "-h" => [ false, "Help menu." ],
"-t" => [ true, "Time interval in seconds between recollection of keystrokes, default 30 seconds." ], "-t" => [ true, "Time interval in seconds between recollection of keystrokes, default 30 seconds." ],
"-c" => [ true, "Type of key capture. (0) for user key presses or (1) for winlogon credential capture Default is 0." ], "-c" => [ true, "Type of key capture. (0) for user key presses, (1) for winlogon credential capture, or (2) for no migration. Default is 2." ],
"-l" => [ false, "Lock screen when capturing Winlogon credentials."], "-l" => [ false, "Lock screen when capturing Winlogon credentials."],
"-k" => [ false, "Kill old Process"] "-k" => [ false, "Kill old Process"]
) )
@ -40,7 +40,7 @@ logfile = logs + ::File::Separator + host + filenameinfo + ".txt"
keytime = 30 keytime = 30
#Type of capture #Type of capture
captype = 0 captype = 2
# Function for locking the screen -- Thanks for the idea and API call Mubix # Function for locking the screen -- Thanks for the idea and API call Mubix
def lock_screen def lock_screen
print_status("Locking Screen...") print_status("Locking Screen...")
@ -191,7 +191,11 @@ kill = false
end end
} }
if client.platform =~ /win32|win64/ if client.platform =~ /win32|win64/
if explrmigrate(session,captype,lock, kill) if (captype.to_i == 2)
if startkeylogger(session)
keycap(session, keytime, logfile)
end
elsif explrmigrate(session,captype,lock, kill)
if startkeylogger(session) if startkeylogger(session)
keycap(session, keytime, logfile) keycap(session, keytime, logfile)
end end