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

enum_xchat updates and upgrades #13306

Merged
merged 6 commits into from
Jun 5, 2020
Merged

enum_xchat updates and upgrades #13306

merged 6 commits into from
Jun 5, 2020

Conversation

h00die
Copy link
Contributor

@h00die h00die commented Apr 22, 2020

enum_xchat hasn't been updated in almost 8yrs (#291). This update does several things to help get it inline for #11998:

  1. Adds docs
  2. processes the config file to pull out usernames and passwords and db them
  3. makes it a multi module, so we now have windows support
  4. xchat died in 2015, it was forked and the current app is hexchat. Paths very slightly, so add hexchat support.
  5. rubocop -a
  6. use libs when available.

Verification

  • Try it on windows & linux with xchat and hexchat.
  • Check docs

I wasn't able to get xchat installed on fedora 31, too many libs that have to be OLD or manually compiled. Didn't seem worth the time. Since I wasn't able to install, I left sinn3r's original code there for enumerating log files. The regex seemed overly complex, so I didn't want to change it w/o knowing what it did and having some test data.

Comment on lines +42 to +43
OptBool.new('HEXCHAT', [false, 'Enumerate hexchat', true ]),
OptBool.new('XCHAT', [false, 'Enumerate xchat', false ])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason not to do both by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured since it hasn't been maintained in 5yrs, it's unlikely anyone is running it. We could save a few system calls by not looking for it by default

modules/post/multi/gather/enum_hexchat.rb Outdated Show resolved Hide resolved
modules/post/multi/gather/enum_hexchat.rb Outdated Show resolved Hide resolved
@wvu
Copy link
Contributor

wvu commented Apr 22, 2020

Does anyone even still use XChat?

@bcoles
Copy link
Contributor

bcoles commented Apr 22, 2020

Does anyone even still use XChat?

Sure, for testing purposes ... Oh right, XChat, not HexChat.

@wvu
Copy link
Contributor

wvu commented Apr 22, 2020

No one using BitchX? ;))

@bcoles
Copy link
Contributor

bcoles commented Apr 22, 2020

No one using BitchX? ;))

I tried, but I was too lame to read bitchx.doc

@h00die
Copy link
Contributor Author

h00die commented Apr 23, 2020

Turns out the windows and linux code for chat logs on xchat is the same. So i've just removed that code.

modules/post/multi/gather/enum_hexchat.rb Outdated Show resolved Hide resolved
modules/post/multi/gather/enum_hexchat.rb Outdated Show resolved Hide resolved
@bwatters-r7 bwatters-r7 self-assigned this Jun 4, 2020
@bwatters-r7
Copy link
Contributor

msf5 post(multi/gather/enum_hexchat) > run

[!] SESSION may not be compatible with this module.
[+] Downloading: C:\Users\msfuser\AppData\Roaming\X-Chat 2\servlist_.conf
[-] File not found: C:\Users\msfuser\AppData\Roaming\X-Chat 2\xchat.conf
[-] Chat logs not found at C:\Users\msfuser\AppData\Roaming\X-Chat 2\\xchatlogs
[+] servlist_.conf saved as /home/tmoose/.msf4/loot/20200605174138_default_192.168.134.148_xchat.config_764965.txt
[+] Downloading: C:\Users\msfuser\AppData\Roaming\HexChat\servlist.conf
[+] Downloading: C:\Users\msfuser\AppData\Roaming\HexChat\hexchat.conf
[+] IRC nick: msfuser
[+] IRC nick1: msfuser
[+] IRC nick2: msfuser_
[+] IRC nick3: msfuser__
[*] Downloading: C:\Users\msfuser\AppData\Roaming\HexChat\\logs\freenode\.log
[*] Downloading: C:\Users\msfuser\AppData\Roaming\HexChat\\logs\freenode\freenode.log
[*] Downloading: C:\Users\msfuser\AppData\Roaming\HexChat\\logs\freenode\server.log
[*] Downloading: C:\Users\msfuser\AppData\Roaming\HexChat\\logs\NETWORK\server.log
[+] servlist.conf saved as /home/tmoose/.msf4/loot/20200605174140_default_192.168.134.148_hexchat.config_836574.txt
[+] hexchat.conf saved as /home/tmoose/.msf4/loot/20200605174140_default_192.168.134.148_hexchat.config_811221.txt
[+] C:\Users\msfuser\AppData\Roaming\HexChat\\logs\freenode\.log saved as /home/tmoose/.msf4/loot/20200605174140_default_192.168.134.148_hexchat.chatlogs_381807.txt
[+] C:\Users\msfuser\AppData\Roaming\HexChat\\logs\freenode\freenode.log saved as /home/tmoose/.msf4/loot/20200605174140_default_192.168.134.148_hexchat.chatlogs_864432.txt
[+] C:\Users\msfuser\AppData\Roaming\HexChat\\logs\freenode\server.log saved as /home/tmoose/.msf4/loot/20200605174140_default_192.168.134.148_hexchat.chatlogs_927867.txt
[+] C:\Users\msfuser\AppData\Roaming\HexChat\\logs\NETWORK\server.log saved as /home/tmoose/.msf4/loot/20200605174140_default_192.168.134.148_hexchat.chatlogs_270376.txt
[*] Post module execution completed
msf5 post(multi/gather/enum_hexchat) > 

@bwatters-r7 bwatters-r7 merged commit 1905001 into rapid7:master Jun 5, 2020
@bwatters-r7
Copy link
Contributor

bwatters-r7 commented Jun 5, 2020

Release Notes

Theenum_xchat module was updated by adding documentation, dumping credentials to the database, adding Windows support, adding HexChat support, cleaning up the code, and using libraries when available. The new multi-module is named enum_hexchat.

@h00die h00die deleted the xchat branch June 5, 2020 23:31
@tperry-r7 tperry-r7 added the rn-enhancement release notes enhancement label Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants