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

Use of uninitialized value $os_info in concatenation (.) or string at /bin/enum4linux line 464. #5

Open
r3k2 opened this issue Oct 11, 2017 · 18 comments

Comments

@r3k2
Copy link

r3k2 commented Oct 11, 2017

for some time I can't use -o on enum4linux
I have try ti find out the issue.. and I think is smbclient has changed..
enum4linux is trying:
smbclient -W 'MYGROUP' //'xx.xx.x.xx'/ipc$ -U''%'' -c 'q' 2>&1
but returns nothing..

smbclient when connected does not output any information anymore

I went into the code I see no issue:

# Get OS info
 456 sub get_os_info {
 457   print_heading("OS information on $global_target");
 458   my $command = "smbclient -W '$global_workgroup' //'$global_target'/ipc\$ -U'$global_username'\%'$global_password' -c 'q' 2>&1";
 459   print "[V] Attempting to get OS info with command: $command\n" if $verbose;
 460   my $os_info = `$command`;
 461   chomp $os_info;
 462   if (defined($os_info)) {
 463     ($os_info) = $os_info =~ /(Domain=[^\n]+)/s;
 464     print "[+] Got OS info for $global_target from smbclient: $os_info\n";
 465   }

so I think smbclient newer versions are missing something
anyone have an idea to fix this with out going to an old version of smbclient?

@r3k2
Copy link
Author

r3k2 commented Oct 11, 2017

in the mean time I am using the metasploit auxiliary but I rather use enum4linux if they ever fix this.. I rarely use metasploit so is a pain to load it just for this.

@schrodyn
Copy link

Hi,

Did you ever figure out what changed with smbclient that it doesn't show this output anymore? I came across your bug while trying to figure this issue out myself. I, like you, don't want to have to rely on the MSF aux each time I want the running service information.

Cheers.

@8l1NKY
Copy link

8l1NKY commented Nov 28, 2017

Same issue as above

@ghost
Copy link

ghost commented Jan 10, 2018

same issue

@batterystaples
Copy link

It appears to be related to this commit in Samba:
samba-team/samba@5a794ec

Compiling 2.6.7 from source works for now. I've made a bug report to Kali with some suggested solutions since this is appears to be more of a packaging/dependency problem.
https://bugs.kali.org/view.php?id=4495

@kd8bny
Copy link

kd8bny commented Feb 6, 2018

@appleorange1 Interesting IP in that bug report ;)
Can confirm issue and solution

@kerbroasted
Copy link

Has this been resolved, as I still appear to be having the same issue.
enum4linux v0.8.9
OS: Linux linux 4.15.0-kali3-amd64 #1 SMP Debian 4.15.17-1kali1 (2018-04-25) x86_64 GNU/Linux

@boomshankerx
Copy link

boomshankerx commented Jun 5, 2018

Bump Kali 2018.1
enum4linux v0.8.9
Linux vkali 4.15.0-kali3-amd64 #1 SMP Debian 4.15.17-1kali1 (2018-04-25) x86_64 GNU/Linux

Looks like it's a Kali bug though.

@derWeihnachtsmann
Copy link

Still got this bug...

@r3k2
Copy link
Author

r3k2 commented Aug 20, 2018

me to on kali and on Blackarch and Arch still

@Dvirus89
Copy link

It appears to be related to this commit in Samba:
samba-team/samba@5a794ec

Compiling 2.6.7 from source works for now. I've made a bug report to Kali with some suggested solutions since this is appears to be more of a packaging/dependency problem.
https://bugs.kali.org/view.php?id=4495

Hi, "Compiling 2.6.7 from source works for now" -> can you please explain?
I need a workaround as well.

thanks.

@noraj
Copy link

noraj commented May 31, 2019

still have the bug

1 similar comment
@JustOneMoreDog
Copy link

still have the bug

@sopsmattw
Copy link

sopsmattw commented Sep 20, 2020

As a workaround for this, add "-w domainname" to the command line. -w specifies the workgroup, which in AD is also the domain name.

@pr0b3r7
Copy link

pr0b3r7 commented Apr 9, 2021

@sopsmattw - tried -w solution without joy:

Screenshot 2021-04-09 14:36:47

@timb-machine
Copy link
Contributor

I have a couple of ideas for this. Leave it with me and I'll see if I can get a reliable fix done.

@timb-machine
Copy link
Contributor

So, I've just added workgroup/domain guessing via DNS (something Mark and I played with years ago but never rolled into enum4linux). I've also added some cleaned up detection to handle the case where smbclient can't gain the null share due to a protocol mismatch. This isn't a full fix but it at least takes us in the right direction. I have a test domain spunk up on latest Windows, next job is to get out a Kali and see if we can improve the version detection because I suspect there are probably multiple root causes depending on the exact combinations of Samba and victim.

@pr0b3r7
Copy link

pr0b3r7 commented Apr 10, 2021

@timb-machine thank you for looking into it and sharing the plans. Is there anything I can do to collaborate with the testing or make things easier for you? Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests