byt3bl33d3r / CrackMapExec

A swiss army knife for pentesting networks
BSD 2-Clause "Simplified" License
8.43k stars 1.64k forks source link

Fix cmedb displayed credentials for mssql #681

Closed juliourena closed 1 year ago

juliourena commented 1 year ago

The columns were not in the correct order, which caused them to be displayed incorrectly. This change properly orders the way CMEDB displays credentials in the mssql protocol.

Before:

cmedb (default)(mssql) > creds

+Credentials---------+----------------------------------+-----------+---------------+---------------+
| CredID | Admin On  | CredType                         | Domain    | UserName      | Password      |
+--------+-----------+----------------------------------+-----------+---------------+---------------+
| 1      | 0 Host(s) | Database2                        | plaintext | DC01          | nicole        |

After:

cmedb (default)(mssql) > creds                                                                                                                                                                

+Credentials---------+-----------+---------------+---------------+----------------------------------+                                                                                         
| CredID | Admin On  | CredType  | Domain        | UserName      | Password                         |                                                                                         
+--------+-----------+-----------+---------------+---------------+----------------------------------+                                                                                         
| 1      | 0 Host(s) | plaintext | DC01          | nicole        | Database2                        |