Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: DB -> C++ -> XS/Swig -> DBI -> Perl

by bulk88 (Priest)
on Jan 30, 2014 at 00:34 UTC ( [id://1072608]=note: print w/replies, xml ) Need Help??


in reply to DB -> C++ -> XS/Swig -> DBI -> Perl

Distributing object code is not security. Use a disassembler, or debugger with asm level breakpoints. Put a breakpoint on the start of the asm code of the db connection function call. Look at register esp/rsp, and the C prototype of the db connect function. Look at the C stack as 4/8byte int arrays. On entry to the C function, esp/rsp will be -4/-8 from return address or on the return address, Work your way numerically upwards from the pointer in reg esp. One of those will a string pointer with the db username and password.
  • Comment on Re: DB -> C++ -> XS/Swig -> DBI -> Perl

Replies are listed 'Best First'.
Re^2: DB -> C++ -> XS/Swig -> DBI -> Perl
by afoken (Chancellor) on Feb 01, 2014 at 15:27 UTC

    Possibly another way to get username and password: If database and "secret" C++ code run or can run on different machines, connect both machines with a hub (or a managed switch with a "monitor" port), connect a third machine running wireshark, trace packages send from the client to the database. My guess is that the database does not encrypt communication, at least not by default. Probably, wireshark knows the database protocol. In the best case, username and password are send in plain text over the wire.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re^2: DB -> C++ -> XS/Swig -> DBI -> Perl
by qhen (Acolyte) on Sep 03, 2014 at 14:13 UTC
    That does not answer the question. We all know what you describe can be done.
      Hum the thing is getting old but by the way I've to need the right to access it:
      cpan> install DBD::Oracle CPAN::SQLite not installed, trying to work without Reading 'C:\STRAWB~1\cpan\Metadata' Database was generated on Sun, 01 Jan 2023 22:54:07 GMT Running install for module 'DBD::Oracle' Fetching with LWP: http://cpan.strawberryperl.com/authors/id/Z/ZA/ZARQUON/DBD-Oracle-1.83 +.tar.gz LWP failed with code[501] message[Can't load 'C:\xampp\perl\vendor\lib +/auto/Net/SSLeay/SSLeay.xs.dll' for module Net::SSLeay: load_file:Le +module spÚcifiÚ est introuvable (LWP::Protocol::https not installed)] Warning: no success downloading 'C:\STRAWB~1\cpan\sources\authors\id\Z +\ZA\ZARQUON\DBD-Oracle-1.83.tar.gz.tmp4192'. Giving up on it. Fetching with LWP: http://www.cpan.org/authors/id/Z/ZA/ZARQUON/DBD-Oracle-1.83.tar.gz Fetching with LWP: http://www.cpan.org/authors/id/Z/ZA/ZARQUON/CHECKSUMS Checksum for C:\STRAWB~1\cpan\sources\authors\id\Z\ZA\ZARQUON\DBD-Orac +le-1.83.tar.gz ok Scanning cache C:\STRAWB~1\cpan\build for sizes ...................................................................... +......DONE Configuring Z/ZA/ZARQUON/DBD-Oracle-1.83.tar.gz with Makefile.PL Can't locate DBI.pm in @INC (you may need to install the DBI module) ( +@INC contains: C:/xampp/perl/site/lib C:/xampp/perl/vendor/lib C:/xam +pp/perl/lib .) at Makefile.PL line 20. BEGIN failed--compilation aborted at Makefile.PL line 20. Warning: No success on command[C:\xampp\perl\bin\perl.exe Makefile.PL] ZARQUON/DBD-Oracle-1.83.tar.gz C:\xampp\perl\bin\perl.exe Makefile.PL -- NOT OK Stopping: 'install' failed for 'DBD::Oracle'. Failed during this command: ZARQUON/DBD-Oracle-1.83.tar.gz : writemakefile NO 'C:\x +ampp\perl\bin\perl.exe Makefile.PL' returned status 512 cpan>

        The error message contains (LWP::Protocol::https not installed) - most likely, you don't have that module installed. This is weird since Strawberry Perl usually contains it, and also contains SSLeay.xs.dll.

        How did you install Strawberry Perl? Is there such a file SSLeay.xs.dll on your harddisk somewhere?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1072608]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2024-04-26 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found