Russian3434 / armitage

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

Error loading Armitage when home directory is on another drive #33

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install armitage (as shown in tutorial) in Windows 7.
2. Run msfconsole first.
3. Run armitage.bat

What is the expected output? What do you see instead?
After clicking "Start MSF", nothing comes on.

What version of Metasploit are you using (type: svn info)? On which
operating system?
Metasploit Rev 11705
OS - Windows 7

Which database are you using?
Postgresql

Please provide any additional information below.
On running "java -jar armitage.jar" (with PATH and JAVA_HOME set correctly):

Exception in thread "Thread-4" java.lang.reflect.UndeclaredThrowableException
        at $Proxy1.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.FileNotFoundException: 
C:\framework\msf3\data\armitage\E:\.armitage.prop (The filename, directory 
name, or volume label syntax is incorrect)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at sleep.engine.atoms.ObjectNew$ConstructorCallRequest.execute(Unknown Source)
        at sleep.engine.CallRequest.CallFunction(Unknown Source)
        at sleep.engine.atoms.ObjectNew.evaluate(Unknown Source)
        at sleep.engine.Block.evaluate(Unknown Source)
        at sleep.engine.Block.evaluate(Unknown Source)
        at sleep.bridges.SleepClosure.evaluate(Unknown Source)
        at sleep.engine.CallRequest$FunctionCallRequest.execute(Unknown Source)
        at sleep.engine.CallRequest.CallFunction(Unknown Source)
        at sleep.engine.atoms.Call.evaluate(Unknown Source)
        at sleep.engine.Block.evaluate(Unknown Source)
        at sleep.engine.Block.evaluate(Unknown Source)
        at sleep.engine.atoms.Decide.evaluate(Unknown Source)
        at sleep.engine.Block.evaluate(Unknown Source)
        at sleep.engine.Block.evaluate(Unknown Source)
        at sleep.bridges.SleepClosure.evaluate(Unknown Source)
        at sleep.engine.ProxyInterface.invoke(Unknown Source)
        ... 2 more

Original issue reported on code.google.com by srij...@gmail.com on 4 Feb 2011 at 10:50

GoogleCodeExporter commented 8 years ago
I think the problem is that your home directory is on the E:\ drive and not the 
C:\ drive. Not really a Windows 7 bug. This is just my guess. Nothing to do 
with Windows 7. It looks like the exception is caused when loading the 
preferences file. No issue. I'll fix this and you'll be on your way.

Original comment by rsmu...@gmail.com on 4 Feb 2011 at 1:20

GoogleCodeExporter commented 8 years ago
By "home directory", do you mean my "My Documents" directory, or the directory 
in which metasploit is installed (or something else)?

Metasploit is installed in C:\framework
And My Documents is in E:\My Documents

Original comment by srij...@gmail.com on 5 Feb 2011 at 7:20

GoogleCodeExporter commented 8 years ago
The My Documents directory. Although this has zero to do with my documents and 
everything to do with what Windows sees as your home directory (e.g., 
c:\documents and settings\your username\). In this case, it's E:\.

I see the bug in my code. I'll fix it when I get a chance. You could install 
Metasploit in the E:\framework directory. That might fix it.

Or... run a VM with BackTrack. Using Linux and Armitage is the best and most 
tested user experience.

Original comment by rsmu...@gmail.com on 5 Feb 2011 at 9:45

GoogleCodeExporter commented 8 years ago
Installing in E:\ didn't fix it.
But I am using it with BackTrack now.

Thanks.

Original comment by srij...@gmail.com on 5 Feb 2011 at 9:49

GoogleCodeExporter commented 8 years ago
I took a look at this and I'm unable to reproduce the problem, meaning my 
understanding of it was wrong. It appears this is happening when the 
preferences are saved but the code I have to do this is dead simple.

I've added a sanity check to make sure the parent directory of the preferences 
file exists before saving it but this is a band-aid and not a solution.

Did you get the connect dialog before this error happened or does this happen 
straight away when you start Armitage?

Original comment by rsmu...@gmail.com on 13 Feb 2011 at 8:36

GoogleCodeExporter commented 8 years ago
I got the connect dialog first. When I clicked on connect, it gave the error.

Original comment by srij...@gmail.com on 13 Feb 2011 at 8:44

GoogleCodeExporter commented 8 years ago
Similar behaviour here. Tested in two machines, with Windows XP SP3 (one of 
them without any AV/fw). I also followed install instructions.

I run armitage.bat, then "start msf", begin connect timeouts (this seems 
normal), then I get "Using database driver postgresql", click "ok" and.... 
nothing more... I can see rubyw/javaw proccesses with pslist but nor Armitage 
neither MSF console really appear.

More data:
- install dir on machine #1: "c:\archivos de programa\framework"
- install dir on machine #2: "c:\program files\metasploit"
- home is always at C drive so it seems the bug is not "E:" related :)
- MSF latest stable version (3.5.2)
- Armitage latest (armitage022211.zip)

Finally I modified C:\Archivos de programa\framework\msf3\armitage and added 
"-d":
...
    exec "javaw", "-jar", "#{File.dirname(msfbase)}/data/armitage/armitage.jar", "-d", *ARGV
...

I've attached a debug file from one of the machines...

PS: To be honest, this issue seems very important in Windows. Are you sure 
Armitage is tested on Windows? Anybody using it on this OS?

Hope it helps.
-Román

Original comment by roman.me...@gmail.com on 22 Feb 2011 at 11:43

Attachments:

GoogleCodeExporter commented 8 years ago
@Roman The issue you're describing is not related to this one. But I can 
explain what's happening. Metasploit 3.5.2 changed the install process from 
3.5.1. The Metasploit console no longer loads postgres automatically and hence 
the install step that asks you to run it, no longer initializes the database 
tables. When you connect Armitage for the first time, the database is 
initialized and the print out of this process is sent to STDERR. Armitage does 
not consume STDERR. This lack of consumed bytes causes the buffer to fill up 
when all this data is printed and eventually msfrpcd blocks waiting for the 
bytes in the buffer to be consumed. This only happens on the first run. If you 
try running Armitage again, it'll start up just fine. I'll fix this issue in 
the next release.

"Are you sure Armitage is tested on Windows?"

Yes. 

Original comment by rsmu...@gmail.com on 23 Feb 2011 at 12:24

GoogleCodeExporter commented 8 years ago
I retried several times with same (bad) result/bevaviour, ie. Armitage never 
starts. I suppose some manual fix is required... Any help is appreciated.

Original comment by roman.me...@gmail.com on 23 Feb 2011 at 6:30

GoogleCodeExporter commented 8 years ago

Original comment by mohmadah...@gmail.com on 21 Apr 2015 at 1:53

Attachments: