$ ./octopus_checker
Program had started..
Attempting Connection
Connecting ...
The driver reported the following diagnostics whilst running SQLDriverConnect
01000:1:0:[unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found
connected
The binary probably connects using a SQL connection string that contains credentials. Using tools like PEDA (Python Exploit Development Assistance for GDB) we can further examine the file. This is an extension of the standard GNU Debugger (GDB), which is used for debugging C and C++ programs.
Run gdb
$ gdb ./octopus_checker
Set flavor and disas main
We can also see this portion
Add a breakpoint at 0x5555555551b0 or at SQLDriverConnect
DLL File Examination
Sample Scenario
Use Get-FileMetaData in powershell and we will see that this is a .net assembly
Using the debugger and .NET assembly editor dnSpy, we can view the source code directly. This tool allows reading, editing, and debugging the source code of a .NET assembly (C# and Visual Basic).
Inspection of MultimasterAPI.Controllers -> ColleagueController reveals a database connection string containing the password.