Add payloads and changed root os detection#20
Add payloads and changed root os detection#20Virgula0 wants to merge 7 commits intosundowndev:masterfrom
Conversation
|
Hi @Virgula0 and thanks for the efforts put into this PR. To give you some context, this project was abandoned because of lack of time and being more focused on my full time job. If you're motivated enough to make it living and working again, I'm happy to review your changes and publish new releases. The code base is currently unstable and can totally be changed to something more future-proof. I'll come back later to give some feedback on this one. Cheers 🍻 |
I mean, the project aside from needing more structured payloads works fine in my opinion, and even the code style seems to be well structured and self-explanatory. I don't like to omit files by excluding them from the building process because of the target OS, but it is just my opinion. I could suggest some improvements from time to time but the base of the project is already pretty solid. Also, the fact of getting a job and not having any energy or time for maintaining open source projects is absolutely normal and this project it's not an exception. As said, I could open some PR on some problems but, apart from a few adjustments which should not require too much effort, the time is the same for everyone 🙂 |
|
@Virgula0 To be honest I've not run it in a while so I don't really know what's working and what's not. Of course I don't expect you to work on it as a maintainer but feel free to submit change requests like this one.
I can understand that but I think this is very project specific. In this case, the use case differs from one OS to another as software, file system and log patterns can be completely different between Linux and Windows for example. |
|
Hi @sundowndev,any update about this? |
|
@Virgula0 sorry I'm in holidays, I'll take a look asap! |
Hello, and thanks for the great idea.
I used the project utility and found some basic misses in log discovery.
From there I thought to add a P.R just for adding some payload but then I realized that just running
go run main.go(whether for debugging or functional purposes) didn't work, and honestly I don't know how you tested it previously on various OSes.Anyway, let's start from the basics.
This P.R:
1. Adds OS detection at runtime so that
go run main.gowill workTo achieve this, the following were changed:
os.DirFS("")was replaced with the usage of the base root directory which is assigned based onWindowsorLinuxis detected https://github.com/sundowndev/covermyass/compare/master...Virgula0:add-payloads-and-general-improvements?expand=1#diff-13fffd4d5cbaea0cfaedc2cb42d011d60d32c9fde001fd83d7bf172cd049488eL23and https://github.com/sundowndev/covermyass/compare/master...Virgula0:add-payloads-and-general-improvements?expand=1#diff-0df82f8689d3e8d881be0653ab4e9f8221c5835ec95a14930d11669e9c7f07efR10
The file
utils.gohas been moved fromanalysistoutilspackage avoiding cycle importsThe
finder.gowas adapted to the new rooting choice changes https://github.com/sundowndev/covermyass/compare/master...Virgula0:add-payloads-and-general-improvements?expand=1#diff-9a179846f376428fa85acbc4b912ade4773da4fdc3343574e7ccb44e26068600L49From now on you can use
utils.CurrentOS()eventually to make checks on the current OS.2. The file
shell_history_check.gowas changed by adding the followingLinuxlogs were too poor, in fact, before the change, only the user directory was checked for findingbashhistory logs etc... The code has changed so now all users present in/home/*/.bash_historywill be checked. The same reasoning for the/rootdirectory too.3. Other payloads
It is frequent to find logs within the subdirectory folders of apache e.g.
/var/log/apache2/server_name/access.logespecially when using vhosts https://github.com/sundowndev/covermyass/compare/master...Virgula0:add-payloads-and-general-improvements?expand=1#diff-3e037cd0d52d04743d05a753d3922c7d39d3adb886189f55c830d3bcabd10f2bL18Other MySQL logs added https://github.com/sundowndev/covermyass/compare/master...Virgula0:add-payloads-and-general-improvements?expand=1#diff-46987848fff18512def3f358dc982ae2eadf720cc54054005bf94c4857695b06L18
NGNIX subdir cb21902
Results:
Windows
Linux
Hope that it helps, regards