abinesh123 / armitage

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

Import of IPs will create a target 0.0.0.0 if list of IPs have duplicates #132

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a text file at put in the IPs 10.0.0.1, 10.0.0.2, 10.0.0.1 (each IP 
is on a new line)
2.In Armitage, Host -> Import Host and select the text file just created
3.three targets will appear in workspace, 10.0.0.1, 10.0.0.2 and 0.0.0.0

What is the expected output? What do you see instead?
just two targets in workspace. 10.0.0.1 and 10.0.0.2

What version of Metasploit are you using (type: svn info)? On which
operating system?
BackTrack5R3, from latest git update done today 7-Feb-2013.

Which database are you using?
Postgres (default of BackTrack for Metasploit/Armitage)

Please provide any additional information below.

Original issue reported on code.google.com by achian...@gmail.com on 7 Feb 2013 at 3:19

GoogleCodeExporter commented 9 years ago
Version of Metasploit is v4.6.0-dev [core:4.6 api:1.0]

An msfupdate provided the below output:
-------------------------------------------------------------------
HEAD is now at d5b0482 Note linking strat in comment docs
Already on 'master'
Your branch is ahead of 'origin/master' by 495 commits.
Already up-to-date.
-------------------------------------------------------------------

Original comment by achian...@gmail.com on 7 Feb 2013 at 3:26

GoogleCodeExporter commented 9 years ago
Try to reproduce this in the Metasploit Framework console. I suspect this is an 
issue in the framework. Armitage's file import just opens a console and issues 
the db_import command. If you can reproduce it, file a bug with the Metasploit 
Framework team. I can do this, but it's a serious drain on my time to do so. If 
this is definitely an issue isolated to Armitage, let me know and I'll work it.

Original comment by rsmu...@gmail.com on 7 Feb 2013 at 3:36

GoogleCodeExporter commented 9 years ago
I have tested this in Metasploit and the problem seems to be in Armitage only. 
Below is the msfconsole output of my test:

msf > hosts -u

Hosts
=====

address  mac  name  os_name  os_flavor  os_sp  purpose  info  comments
-------  ---  ----  -------  ---------  -----  -------  ----  --------

msf > db_import /root/test.txt 
[*] Importing 'IP Address List' data
[*] Importing host 10.0.0.1
[*] Importing host 10.0.0.2
[*] Importing host 10.0.0.1
[*] Successfully imported /root/test.txt
msf > hosts -u

Hosts
=====

address   mac  name  os_name  os_flavor  os_sp  purpose  info  comments
-------   ---  ----  -------  ---------  -----  -------  ----  --------
10.0.0.1                                                       
10.0.0.2                                                       

msf > exit

Original comment by achian...@gmail.com on 7 Feb 2013 at 6:38

GoogleCodeExporter commented 9 years ago
Excellent follow up. You're always getting 0.0.0.0 in your host view? I'm not 
able to reproduce this.

Original comment by rsmu...@gmail.com on 7 Feb 2013 at 6:54

GoogleCodeExporter commented 9 years ago
Here's what will help me understand what's happening:

1. Go to this site and download eval.cna:
https://github.com/rsmudge/cortana-scripts/tree/master/eval

2. Go to View -> Script Console in Armitage. 

3. Type:

load /path/to/eval.cna

4. Type:

x call("db.hosts")

Paste the output to me here. Also paste the output of the hosts command here 
too. db.hosts is how Armitage sees what is in the database. 

Original comment by rsmu...@gmail.com on 7 Feb 2013 at 7:02

GoogleCodeExporter commented 9 years ago
My apologies for wasting your time, I restarted my BackTrack5 partition and was 
unable to reproduce the problem anymore.  Must be a one off as I could 
reproduce it many times prior to the reboot. My bad. Please consider this issue 
closed.  :(

Original comment by achian...@gmail.com on 7 Feb 2013 at 7:25

GoogleCodeExporter commented 9 years ago
No worries. I thank you for responding so quickly to my questions. You're 
welcome back any time. 

Original comment by rsmu...@gmail.com on 7 Feb 2013 at 7:34