Replies: 1 comment
|
My 2 cents:
Imo nice, we just have to make sure that the host banner doesn't get excessively long.
Let's add them :D more exec_methods -> better
To keep things simple, imo we should add something similar to other flags:
While having multiple modules doing the same or similar things is definitely bad, I would prefer having something where you can:
I don't see how you would do that cleanly with just proto flags, so imo this is still a good opportunity for a module.
I definitely agree on adding the "s" to Imo adding a
:D |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Ayo, here are a few things I'd like to do for the MSSQL protocol but I wanted to have advices about it.
Host enumeration
I believe it would be usefull to print the database version and name. This was proposed before but I think we forgot to merge it so I already opened a PR for that.
Execution method
MSSQL allows running the xp_cmdshell procedure we all know but there are two others ways you can execute command remotely:
Linked servers
So far we have modules to run queries on linked server. Considering it only adds:
To the original query, I was wondering whether we shouldn't just add a core option --linked-server which allows specifying a linked server to execute the query on. Internally NXC would compute the correct query and execute it. That would give us something like:
This implies being able to list linked servers. For the moment it's in a module that I'd rather have as a core option. Something like:
Privileges and privesc
We have multiple modules that can be used to enumerate privilegies and privesc:
While these are already greats, I'd rather have a core option that runs a simple SQL query allowing retrieving all misconfiguration that could be used by an attacker with an account.
Note that we'll have to add support for a few others things such as, for exampke, xp_cmdshell proxy account allowing running commands even without having sysadmin rights. Because for the moment we only check if the user is in the sysadmin group but if the proxy account exeists, then all these protocols can be used as well: empire_exec, met_inject, web_delivery as well as standard -x.
Pure SQL things
So far we have a --database option allowing listing databases. I'd move that to the --list-databases. And keep --database to select a database to which we can then --list-tables to list the tables of the DB. Then we can even add a --database DB --dump-table TABLE_NAME and so on.
Other things
I or someone else have a already opened a few PR's allowing to:
These are pretty much the things I want to integrate to NXC MSSQL because I believe that would make this protocol much more powerful and easier to use.
Let me know! :)
All reactions