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

Feature request: IgnoreComments advanced option for word list processing #11610

Open
3 tasks
snoski3 opened this issue Mar 22, 2019 · 3 comments
Open
3 tasks
Labels
enhancement feature not-stale Label to stop an issue from being auto closed

Comments

@snoski3
Copy link

snoski3 commented Mar 22, 2019

I'm not sure if this should be under feature request or a bug.

Steps to reproduce

How'd you do it?

  1. Use aux/scanner/ssh/ssh_enumusers
  2. set user_file to /usr/share/wordlists/dirbuster/apache-user-enum-1.0.txt

This section should also tell us any relevant information about the
environment; for example, if an exploit that used to work is failing,
tell us the victim operating system and service versions.

Expected behavior

What should happen?
The scanner skips the comment section and continues to the list of words.

Current behavior

What happens instead?
It uses the comment section as input.

System stuff

Metasploit version

Get this with the version command in msfconsole (or git log -1 --pretty=oneline for a source install).
Framework: 5.0.11-dev
Console : 5.0.11-dev

I installed Metasploit with:

OS

What OS are you running Metasploit on?
Kali 2019.1
ssh enum

@bcoles
Copy link
Contributor

bcoles commented Mar 22, 2019

This should probably be an advanced option IgnoreComments, off by default, so as to not unintentionally skip passwords beginning with a #.

An over-engineered approach may be to count the number of lines beginning with # and throw a warning. At which point it would already be too late, so, 🤷

As far as I'm aware, no standard exists for word lists. Considering lines prefaced with # to be comments is an unofficial standard. For example, despite their frequent use in CSV documents, the CSV standard does not permit comments.

@wvu
Copy link
Contributor

wvu commented Mar 22, 2019

I saw your post to the mailing list, @snoski3. I agree it can be a useful enhancement, but @bcoles hit all of my own points right on the head.

At best, I'd make this a default-off advanced option. There is no standard for processing word lists, and I'm not keen to generalize niche behavior.

Also, note that this behavior isn't exclusive to ssh_enumusers. That may complicate implementation.

In the meantime, I suggest preprocessing the file traditionally. Here's what I did with grep(1):

wvu@kharak:~/Downloads$ grep -vE '^(#|$)' apache-user-enum-1.0.txt > apache-user-enum-1.0-preprocessed.txt
wvu@kharak:~/Downloads$ head !$
head apache-user-enum-1.0-preprocessed.txt
~root
~toor
~bin
~daemon
~adm
~lp
~sync
~shutdown
~halt
~mail
wvu@kharak:~/Downloads$

Note that blank lines are also removed. With a Unix pipeline, you can use your imagination.

@wvu wvu changed the title SSH Enumusers Issue Feature request: IgnoreComments advanced option for word list processing Mar 22, 2019
@github-actions
Copy link

Hi!

This issue has been left open with no activity for a while now.

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 30 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.

@github-actions github-actions bot added the Stale Marks an issue as stale, to be closed if no action is taken label Nov 20, 2020
@dwelch-r7 dwelch-r7 added not-stale Label to stop an issue from being auto closed and removed Stale Marks an issue as stale, to be closed if no action is taken labels Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature not-stale Label to stop an issue from being auto closed
Projects
None yet
Development

No branches or pull requests

4 participants