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

ipmi-brute fixes #2086

Closed
wants to merge 2 commits into from
Closed

ipmi-brute fixes #2086

wants to merge 2 commits into from

Conversation

@starblast
Copy link

starblast commented Jul 20, 2020

Needed to do ipmi default credential scanning but hit a bunch of errors on 7.80 nmap. Seems like the default behavior of bin.unpack was to treat the position argument as 1 even if the value was zero. string.unpack does not seem to do this (at least now). These fixes resolve the problem and I am now able to do ipmi-version and ipmi-brute.

starblast added 2 commits Jul 20, 2020
…npack' (initial position out of string)

/usr/bin/../share/nmap/nselib/ipmi.lua:241: bad argument #3 to 'unpack' (initial position out of string)
stack traceback:
	[C]: in function 'string.unpack'
	/usr/bin/../share/nmap/nselib/ipmi.lua:241: in function 'ipmi.parse_open_session_reply'
	/usr/bin/../share/nmap/scripts/ipmi-brute.nse:64: in method 'login'
	/usr/bin/../share/nmap/nselib/brute.lua:768: in method 'doAuthenticate'
	/usr/bin/../share/nmap/nselib/brute.lua:821: in function </usr/bin/../share/nmap/nselib/brute.lua:797>
…unt' is not declared

NSE: ipmi-brute against 10.157.137.17:623 threw an error!
/usr/bin/../share/nmap/scripts/ipmi-brute.nse:107: variable 'Account' is not declared
stack traceback:
	[C]: in function 'error'
	/usr/bin/../share/nmap/nselib/strict.lua:80: in metamethod '__index'
	/usr/bin/../share/nmap/scripts/ipmi-brute.nse:107: in method 'login'
	/usr/bin/../share/nmap/nselib/brute.lua:768: in method 'doAuthenticate'
	/usr/bin/../share/nmap/nselib/brute.lua:821: in function </usr/bin/../share/nmap/nselib/brute.lua:797>
@cldrn cldrn added bug NSE labels Jul 20, 2020
@nnposter nnposter self-assigned this Jul 20, 2020
@nnposter
Copy link

nnposter commented Jul 20, 2020

Thank you for investigating the issues.
The script fix has been committed as r37961. (There was one other script with the same defect.)
The library fix will follow.

@nnposter
Copy link

nnposter commented Jul 20, 2020

The library fix has been committed as r37963. Thank you for contributing to Nmap!

@nmap-bot nmap-bot closed this in e47c491 Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.