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

Script does not work with usernames containing whitespace #13

Open
daniel-cues opened this issue Feb 23, 2022 · 3 comments
Open

Script does not work with usernames containing whitespace #13

daniel-cues opened this issue Feb 23, 2022 · 3 comments

Comments

@daniel-cues
Copy link

The script uses

for u in $(cat $userslist); do 
    (echo -n "[*] user $u%$password " && rpcclient -U "$domain/$u%$password" -c "getusername;quit" $target) >> logs/spray-logs.txt
done

Without modifying IFS as so (this might be an improper fix though, as far as I'm concerned, the actual way to read lines in bash is with read, as in the password reading part of the script):

IFS=$'\n'
...
unset IFS

This translates into usernames with whitespace in them not being supported. the logs also use "cut -d ' ' ", that would also break with whitespace in the username

@hackerlawyer
Copy link

did this result in \r being placed after usernames in requests by chance? seeing that in wireshark and cant figure out why known valid logins are returning as false negatives

@hackerlawyer
Copy link

Nevermind found solution to my problem. Add a whitespace after each username or it will send a carriage return following the username (analyzed at packet level with wireshark) and cause logon failures even when password is accurate

@hackerlawyer
Copy link

it still sends a carriage return username as an attempted logon in following packet but does so seperately. As long as their isn't a username of r on the network it shouldnt cause any lockout issues

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

No branches or pull requests

2 participants