ODBCConf – Lolbin Trifecta

I posted about ODBCConf before and then posted again on Twitter.

The Twitter bit was about REGSVR:

odbcconf.exe /a {REGSVR c:\test\test.dll}

– loads a DLL

At that time I looked at other ACTIONS accepted by this tool, but didn’t explore them fully. Of course, the one I did want to explore the most was INSTALLDRIVER, but put it on a backburner. I eventually tested it today and here’s the result:

ODBCConf /ld foo /a {INSTALLDRIVER "test|Driver=c:\test\test64.dll|APILevel=2"}

This will set up ‘test’ driver entry in Registry.

We then need to force that DLL to load. There are two ways — via GUI — need to launch odbcad32.exe, then click ‘Add DSN’ and choose ‘test’:

Or, we can do it via command line as well 🙂

odbcconf configsysdsn "test" "DSN=test"