Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   GDB debugging problem ??? Help needed (https://forum.exetools.com/showthread.php?t=7747)

Nelson_Wee 06-28-2005 11:11

GDB debugging problem ??? Help needed
 
Hello guys. Need ur help . I am new to gdb debugging ? I gdb a daemon magma and got this message ?

************************************

This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found)...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /home/wls/magma_tool/linux24_x86/flexlm/flex/magma
(no debugging symbols found)...[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 10833)]
(no debugging symbols found)...(no debugging symbols found)...11:05:06 (magma) FLEXlm version 8.4a
11:05:06 (magma) Vendor daemons must be run by lmgrd

Program exited with code 060.
**********************************************

How do I get or add symbol to the gdb ? Can use objdump ?

Please help ?

Thx in advance .

Regards.

upb 06-28-2005 17:29

why do you think that this image has debug symbols anyway?

homersux 06-29-2005 08:39

11:05:06 (magma) Vendor daemons must be run by lmgrd

symbols won't help you here. there are tons of linux
apps that can parse binary strings. however the problem
here is that magma must be exec-ed from lmgrd (as
parent process) not gdb. You need to bypass this
check first.

Nelson_Wee 06-30-2005 10:20

gdb debugging help nedded ?
 
Hello. I managed to debug the daemon and run on gdb ? I trying to get the seed/info using freesoft method "
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
you can write a program such as:
int main(int argc, char **argv)
{
for (int i = 0; i < argc, i++)
{
printf("%s\n", argv[i]);
}
return 0;
}
compile and replace your daemon, run lmgrd, you can get what you want.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

but it didnot work . I paste it below , please have a look the let me know ?
step used :
(1) run lmgrd and get -T 10.1.4.238 8.4 3 -c magma.lic --lmgrd_start 42c34512
(2) gdb daemon
(3) run -T 10.1.4.238 8.4 3 -c magma.lic
(4) managed to see reg info
(5) replace the org daemon with the compile C daemon.c
(6) run -T 10.1.4.238 8.4 3 -c magma.lic

Nothing happen ?

Please help ?
== >>>>>>

9:57:55 (magma) FLEXlm version 8.4a
9:57:55 (magma) Vendor daemons must be run by lmgrd

Program exited with code 060.
(gdb) run -T 10.1.4.238 8.4 3 -c magma.lic
Starting program: /home/wls/magma_tool/linux24_x86/flexlm/flex/magma -T 10.1.4.238 8.4 3 -c magma.lic
Incorrectly built binary which accesses errno or h_errno directly. Needs to be fixed.
Error while mapping shared library sections:
: Success.
Error while reading shared library symbols:
: No such file or directory.
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.
9:58:23 (magma) FLEXlm version 8.4a
Error while reading shared library symbols:
: No such file or directory.
(no debugging symbols found)...Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.
(no debugging symbols found)...(no debugging symbols found)...Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.
(no debugging symbols found)...(no debugging symbols found)...Error while reading shared library symbols:
: No such file or directory.
9:58:23 (magma) Server started on 10.1.4.238 for: BLAST_VIEW
9:58:23 (magma) BLAST_WRAP BLAST_SPEED BLAST_BUILDER

Program received signal SIGINT, Interrupt.
0x55132462 in select () from /lib/i686/libc.so.6
(gdb) info reg
eax 0xfffffdfe -514
ecx 0x80e0800 135137280
edx 0x80e0888 135137416
ebx 0x400 1024
esp 0xfefff4cc 0xfefff4cc
ebp 0xfefff4f0 0xfefff4f0
esi 0x0 0
edi 0xfefff5a4 -16779868
eip 0x55132462 0x55132462
eflags 0x246 582
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb) run -T 10.1.4.238 8.4 3 -c magma.lic
The program being debugged has been started already.
Start it from the beginning? (y or n) n
Program not restarted.
(gdb) run -T 10.1.4.238 8.4 3 -c magma.lic
The program being debugged has been started already.
Start it from the beginning? (y or n) y
`/home/wls/magma_tool/linux24_x86/flexlm/flex/magma' has changed; re-reading symbols.
(no debugging symbols found)

Starting program: /home/wls/magma_tool/linux24_x86/flexlm/flex/magma -T 10.1.4.238 8.4 3 -c magma.lic
]/bin/bash: line 1: /home/wls/magma_tool/linux24_x86/flexlm/flex/magma: cannot execute binary file
/bin/bash: line 1: /home/wls/magma_tool/linux24_x86/flexlm/flex/magma: Success

Program exited with code 01.
warning: shared library handler failed to enable breakpoint
You can't do that without a process to debug.
(gdb) info reg
The program has no registers now.

Nelson_Wee 06-30-2005 10:40

GDB reply !!! Help nedded
 
Quote:

Originally Posted by homersux
11:05:06 (magma) Vendor daemons must be run by lmgrd

symbols won't help you here. there are tons of linux
apps that can parse binary strings. however the problem
here is that magma must be exec-ed from lmgrd (as
parent process) not gdb. You need to bypass this
check first.

==>>> Start here

Hello homersux. I see ur point !!! Managed to run debugging of daemon. But , stuck at break point ? I follow CrackZ latest information , how to find the right place to break and to break ( in crackz example
lea ecx,[ebp+var_280]
push ecx <---------- Vendor code structure
.
.
-----------------------------------------------------------
In magma objdump
804adc1: 8b 45 cc mov 0xffffffcc(%ebp),%eax
804adc4: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx
804adcb: 8b 55 d0 mov 0xffffffd0(%ebp),%edx
804adce: 29 ca sub %ecx,%edx
804add0: 89 55 d0 mov %edx,0xffffffd0(%ebp)
804add3: 8d 45 fc lea 0xfffffffc(%ebp),%eax
804add6: 89 45 cc mov %eax,0xffffffcc(%ebp)
804add9: 8b 7d f4 mov 0xfffffff4(%ebp),%edi
804addc: 89 f8 mov %edi,%eax
804adde:
---------------------------------------------------------------------------

Its different ?

Can u help in locating and see the data and job ?

Thx in advance .

>> Cannot find or how to look ?
+++++++++++++++++++++++++++++++++++
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found)...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run -T 10.1.4.238 8.4 3 -c magma.lic
Starting program: /home/wls/magma_tool/linux24_x86/flexlm/flex/magma -T 10.1.4.238 8.4 3 -c magma.lic
Incorrectly built binary which accesses errno or h_errno directly. Needs to be fixed.
Error while mapping shared library sections:
: Success.
Error while reading shared library symbols:
: No such file or directory.
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.
10:21:19 (magma) FLEXlm version 8.4a
Error while reading shared library symbols:
: No such file or directory.
(no debugging symbols found)...Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.
(no debugging symbols found)...(no debugging symbols found)...Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.
(no debugging symbols found)...(no debugging symbols found)...Error while reading shared library symbols:
: No such file or directory.
10:21:19 (magma) Server started on 10.1.4.238 for: BLAST_VIEW
10:21:19 (magma) BLAST_WRAP BLAST_SPEED BLAST_BUILDER
10:21:19 (magma) BLAST_VHDL BLAST_SI BLAST_RTL
10:21:19 (magma) BLAST_PLAN BLAST_LOGIC BLAST_TEST
10:21:19 (magma) BLAST_CREATE BLAST_RAIL BLAST_FUSION
10:21:19 (magma) BLAST_FUSION_APX BLAST_NOISE BLAST_NOISE_APX
10:21:19 (magma) DIAMOND_NOISE DIAMOND_TIME DIAMOND_3DX
10:21:19 (magma) RGEN

Program received signal SIGINT, Interrupt.
0x55132462 in select () from /lib/i686/libc.so.6
(gdb) br 0x804adc1
Function "0x804adc1" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (0x804adc1) pending.
(gdb) info reg
eax 0xfffffdfe -514
ecx 0x80e0800 135137280
edx 0x80e0888 135137416
ebx 0x400 1024
esp 0xfefff4cc 0xfefff4cc
ebp 0xfefff4f0 0xfefff4f0
esi 0x0 0
edi 0xfefff5a4 -16779868
eip 0x55132462 0x55132462
eflags 0x246 582
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb) x /10x 0xfffffdfe
0xfffffdfe: Cannot access memory at address 0xfffffdfe


All times are GMT +8. The time now is 07:24.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX