swich2015 / armitage

Automatically exported from code.google.com/p/armitage
0 stars 0 forks source link

java error upon opening armitage #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. when scanning for host
2. when finding attacks
3. anything that involves use of the program after opening it.

What is the expected output? What do you see instead?

"Something went wrong:
Tried: @(msf.RpcConnection@1f7cdc7, 'console.destory', '0')

Error:
java.lan.RuntimeExectpion: Error reading response.

and

"Something went wrong:
Tried: @(msf.RpcConnection@1f7cdc7, 'db.status')

Error:
java.lan.RuntimeExectpion: Error reading response. 

What version of Metasploit are you using (type: svn info)? On which
operating system?

metasploit v3.5.1-release
Backtrack R2
java version "1.6.0_23"

Which database are you using?

Please provide any additional information below.

Original issue reported on code.google.com by magneto1...@gmail.com on 14 Dec 2010 at 9:50

GoogleCodeExporter commented 9 years ago
I've seen this in my BT R42 (upgraded from R41) VM. Are you using a fresh R42 
or an upgraded R42?

Here's what happened to me. Metasploit/Ruby was crashing underneath Armitage.  
To verify this, start MSF RPCD (do it in foreground mode with the -f switch) 
separate of Armitage and connect to it. When using Armitage, Metasploit would 
crash, and I would see a nice Ruby panic/stack trace where my MSF RPCD once was.

I looked up the error message and saw that it had to do with a change to the 
Ruby garbage collector API or something weird like that. Using libraries that 
aren't updated to this change can cause this random crash to happen. I'm 
writing a Java GUI, I shouldn't be tracking issues like this down.

Anyways... I went to a new (non-upgraded) Metasploit R42 VM and I've been fine 
since.

Original comment by rsmu...@gmail.com on 14 Dec 2010 at 10:13

GoogleCodeExporter commented 9 years ago
Fresh bt4 r2. so wait for an update with the java GUI? 

Original comment by magneto1...@gmail.com on 14 Dec 2010 at 10:23

GoogleCodeExporter commented 9 years ago
Can you run msfrpcd separately and verify for me whether Ruby is crashing. If 
it is, paste the crash output here. Armitage bangs pretty hard on Metasploit, 
so weird stuff that could cause MSF (or Ruby) to crash will happen. I'm not 
going to be able to fix this in Armitage. The more info I can get about this 
will help get the problem tracked down so I can present it to the Metasploit 
team (or the BackTrack team if it's a stale library). 

Original comment by rsmu...@gmail.com on 14 Dec 2010 at 10:57

GoogleCodeExporter commented 9 years ago
/opt/metasploit3/msf3/lib/msf/core/module_manager.rb:907:in 
`load_module_from_file': 
/opt/metasploit3/msf3/lib/active_support/core_ext/class/inheritable_attributes.r
b:125:in `inherited':  (Interrupt)
        from (eval):14:in `load_module_from_file'
        from /opt/metasploit3/msf3/lib/msf/core/module_manager.rb:859:in `load_modules'
        from /opt/metasploit3/msf3/lib/rex/file.rb:64:in `find'
        from /opt/metasploit3/msf3/lib/rex/file.rb:63:in `catch'
        from /opt/metasploit3/msf3/lib/rex/file.rb:63:in `find'
        from /opt/metasploit3/msf3/lib/msf/core/module_manager.rb:848:in `load_modules'
        from /opt/metasploit3/msf3/lib/msf/core/module_manager.rb:837:in `each'
        from /opt/metasploit3/msf3/lib/msf/core/module_manager.rb:837:in `load_modules'
        from /opt/metasploit3/msf3/lib/msf/core/module_manager.rb:632:in `add_module_path'
        from /opt/metasploit3/msf3/lib/msf/base/simple/framework.rb:111:in `simplify'
        from /opt/metasploit3/msf3/lib/msf/base/simple/framework.rb:70:in `create'
        from /usr/local/bin/msfrpcd:84

so what do you suggest i do for the time being?

Original comment by magneto1...@gmail.com on 14 Dec 2010 at 11:18

GoogleCodeExporter commented 9 years ago
My apologies, this stack trace is different from the issue I described earlier. 
Is that the whole thing? 

Try running Metasploit in the console, loading the database driver, connecting 
to the database, and carrying out some actions. If it breaks, I suggest 
reinstalling Metasploit. 

Original comment by rsmu...@gmail.com on 14 Dec 2010 at 11:26

GoogleCodeExporter commented 9 years ago
Yes thats the whole thing.

./armitage.sh console window error.

java.lang.RuntimeException: Error reading response.
        at msf.RpcConnection.readResp(RpcConnection.java:137)
        at msf.RpcConnection.exec(RpcConnection.java:66)
        at msf.RpcConnection.cacheExecute(RpcConnection.java:261)
        at msf.RpcConnection.execute(RpcConnection.java:239)
        at armitage.ConsoleClient.readResponse(ConsoleClient.java:212)
        at armitage.ConsoleClient.run(ConsoleClient.java:234)
        at java.lang.Thread.run(Unknown Source)
Warning: invalid use of index operator: 'success'['target_host'] at 
targets.sl:46
Warning: Attempted to use foreach on non-array: '' at targets.sl:126
Warning: Attempted to use foreach on non-array: '' at targets.sl:209
java.lang.RuntimeException: Error reading response.
        at msf.RpcConnection.readResp(RpcConnection.java:137)
        at msf.RpcConnection.exec(RpcConnection.java:66)
        at msf.RpcConnection.cacheExecute(RpcConnection.java:261)
        at msf.RpcConnection.execute(RpcConnection.java:239)
        at armitage.CommandClient.exec(CommandClient.java:65)
        at armitage.CommandClient.run(CommandClient.java:41)
        at java.lang.Thread.run(Unknown Source)
Thread id: session.list -> {result=success}
java.lang.RuntimeException: Error reading response.
        at msf.RpcConnection.readResp(RpcConnection.java:137)
        at msf.RpcConnection.exec(RpcConnection.java:66)
        at msf.RpcConnection.cacheExecute(RpcConnection.java:261)
        at msf.RpcConnection.execute(RpcConnection.java:239)
        at msf.RpcConnection.execute(RpcConnection.java:231)
        at armitage.ArmitageTimer.readFromClient(ArmitageTimer.java:26)
        at armitage.ArmitageTimer.run(ArmitageTimer.java:37)
        at java.lang.Thread.run(Unknown Source)
Thread id: db.services -> {wrote=36}
java.lang.RuntimeException: Error reading response.
        at msf.RpcConnection.readResp(RpcConnection.java:137)
        at msf.RpcConnection.exec(RpcConnection.java:66)
        at msf.RpcConnection.cacheExecute(RpcConnection.java:261)
        at msf.RpcConnection.execute(RpcConnection.java:239)
        at armitage.ArmitageTimer.readFromClient(ArmitageTimer.java:29)
        at armitage.ArmitageTimer.run(ArmitageTimer.java:37)
        at java.lang.Thread.run(Unknown Source)
Thread id: db.hosts -> {}
java.lang.RuntimeException: Error reading response.
        at msf.RpcConnection.readResp(RpcConnection.java:137)
        at msf.RpcConnection.exec(RpcConnection.java:66)
        at msf.RpcConnection.cacheExecute(RpcConnection.java:261)
        at msf.RpcConnection.execute(RpcConnection.java:239)
        at armitage.ArmitageTimer.readFromClient(ArmitageTimer.java:29)
        at armitage.ArmitageTimer.run(ArmitageTimer.java:37)
        at java.lang.Thread.run(Unknown Source)
java.lang.RuntimeException: Error reading response.
        at msf.RpcConnection.readResp(RpcConnection.java:137)
        at msf.RpcConnection.exec(RpcConnection.java:66)
        at msf.RpcConnection.cacheExecute(RpcConnection.java:261)
        at msf.RpcConnection.execute(RpcConnection.java:239)
        at armitage.CommandClient.exec(CommandClient.java:59)
        at armitage.CommandClient.run(CommandClient.java:41)
        at java.lang.Thread.run(Unknown Source)

Im going to try the msfconsole and see if it breaks. 

Original comment by magneto1...@gmail.com on 14 Dec 2010 at 11:33

GoogleCodeExporter commented 9 years ago
um, not even sure anymore metasploit is def crashing, dont know why, still 
getting the java error, i updated the metasploit, and went to a fresh install 
of bt 4 r2, still nothing. btw question #4 on the webpage typo on the word 
"install". any last ideas? Thanks 

Original comment by magneto1...@gmail.com on 16 Dec 2010 at 12:59

GoogleCodeExporter commented 9 years ago
Which VM software are you using? 

Original comment by rsmu...@gmail.com on 16 Dec 2010 at 1:08

GoogleCodeExporter commented 9 years ago
Also, you mentioned Metasploit is def crashing, does that mean it's crashing 
when you try it from the console too? 

Original comment by rsmu...@gmail.com on 16 Dec 2010 at 1:09

GoogleCodeExporter commented 9 years ago
VMware® Workstation 7.1.3
its not crashing from the console. 

Original comment by magneto1...@gmail.com on 16 Dec 2010 at 1:23

GoogleCodeExporter commented 9 years ago
I'll add a debug mode to Armitage which will log information to make it easier 
to track down this kind of an issue. 

Here's another stab in the dark though--how many hosts are you scanning? If 
it's less than 20, fair enough. If you're dealing with a lot of hosts, consider 
running nmap outside of Armitage (using -oX to create an XML file) and try 
importing it in. If it crashes Metasploit, send the file to me and I'll see 
what I can do to fix it. 

If that's not the case, feel free to update this ticket with any info you think 
might help. Tell me what you had for breakfast, what steps you took, etc.  I 
don't know what the key piece of information is in this puzzle yet. 

Original comment by rsmu...@gmail.com on 16 Dec 2010 at 10:03

GoogleCodeExporter commented 9 years ago
I've created a jar file with some debug code. It's at: 
http://armitage.googlecode.com/svn/trunk/release/armitage-unix/armitage.jar

Execute Armitage with java -jar armitage.jar -d. Do your normal stuff, it'll 
create a debug.log file in the current directory. Go ahead and email that to 
contact@fastandeasyhacking.com. 

The debug.log file will contain some info about your system 
(System.getProperties().toString() in Java) and a log of the entire 
conversation between Armitage and MSFRPCD.

Original comment by rsmu...@gmail.com on 16 Dec 2010 at 11:46

GoogleCodeExporter commented 9 years ago
Email sent. 

Original comment by magneto1...@gmail.com on 17 Dec 2010 at 5:21

GoogleCodeExporter commented 9 years ago
anything?

Original comment by magneto1...@gmail.com on 19 Dec 2010 at 2:21

GoogleCodeExporter commented 9 years ago
I took a look. I see you have 6 hosts loaded in the DB. Your java properties 
also indicate that you're using the right version of Java. -- I see nothing 
strange in this log file on my first look. 

Next question--when MSF crashes, do you always see the same stack trace that 
you presented in comment #4? If so, how are your Ruby chops? It might be worth 
adding a print statement to module_manager.rb:859 to see what it's crashing on. 

Next step--Try generating the NMAP XML file (use the -oX parameter), import it, 
and run through some steps in Armitage until it crashes (with your nmap file 
imported). Send me that nmap file and tell me what the exact steps you took 
were. I'll reproduce your environment locally and follow your steps. 

Also, type 'svn info .' in the Metasploit top-level directory and provide that 
info here. 

I'll use this information to replicate your set up and try to reproduce what 
you're experiencing. If I'm unsuccessful doing so, I'm going to recommend that 
you reinstall Metasploit and see what happens. 

Original comment by rsmu...@gmail.com on 19 Dec 2010 at 4:10

GoogleCodeExporter commented 9 years ago
I put out another Armitage release today. I haven't forgotten about you, I've 
just been unable to reproduce this crash. The good news, someone else reported 
a bug similar to yours (but MSF wasn't crashing--just Armitage). I reproduced 
AND fixed it. It was even my fault. :) So with that said, go ahead and try the 
latest and see if the situation has improved.  If it hasn't, generate another 
debug log and send it to me. I've updated the debug.log code to capture error 
messages now too.

Original comment by rsmu...@gmail.com on 22 Dec 2010 at 11:30

GoogleCodeExporter commented 9 years ago
I'm unable to reproduce this issue and have made several fixes since this was 
filed. I assume it's resolved.

Original comment by rsmu...@gmail.com on 17 Jan 2011 at 8:44