Page 1 of 1

Debugging applications on TV

Posted: Tue Feb 18, 2014 3:48 pm
by ARCHANGEL
Hello, I've read some articles like viewtopic.php?f=63&t=6186 and viewtopic.php?f=52&t=5555&hilit=gdb from forum, actually I found one more article http://cansecwest.com/slides/2013/Smart ... curity.pdf.

I'm interested in debugging applications on smart tv. The goal is to find some possibility to launch my code on the future firmwares after they will update them. I want to investigate modules by my own. Actually I'm a newbie and I have no idea how to debug the code on my tv.

Of course, I know about arm architecture, about such tools like ida and gdb, I have some experience in reversing on windows, but I'm not familiar with linux OS architecture, and I have a problem with debugging. Where can I read something about building the debugging environment for smart tv?

It would be great to read about OS, installed on tv. Actually, I guessed the gdb/gdbserver have some troubles with debugging, but I have some stupid questions before I started the debugging.

1. How to build gdbserver for my tv?
2. How can I change the network setting to enable remote debugging?
3. Where I can find some manuals about dlopen() or mprotect()? I see they are API functions, but to build modules to use them?
4. What is the idea of hijacking modules?

I understand, that the questions are not so easy but I will be happy to see any suggestions, useful links to articles and books, and some advice. I don't want to get tools, I just want to get knowledge to make such tools by myself.

Re: Debugging applications on TV

Posted: Tue Feb 18, 2014 8:03 pm
by tempinbox
ARCHANGEL wrote:Hello, I've read some articles like viewtopic.php?f=63&t=6186 and viewtopic.php?f=52&t=5555&hilit=gdb from forum, actually I found one more article http://cansecwest.com/slides/2013/Smart ... curity.pdf.

I'm interested in debugging applications on smart tv. The goal is to find some possibility to launch my code on the future firmwares after they will update them. I want to investigate modules by my own. Actually I'm a newbie and I have no idea how to debug the code on my tv.

Of course, I know about arm architecture, about such tools like ida and gdb, I have some experience in reversing on windows, but I'm not familiar with linux OS architecture, and I have a problem with debugging. Where can I read something about building the debugging environment for smart tv?

It would be great to read about OS, installed on tv. Actually, I guessed the gdb/gdbserver have some troubles with debugging, but I have some stupid questions before I started the debugging.

1. How to build gdbserver for my tv?
2. How can I change the network setting to enable remote debugging?
3. Where I can find some manuals about dlopen() or mprotect()? I see they are API functions, but to build modules to use them?
4. What is the idea of hijacking modules?

I understand, that the questions are not so easy but I will be happy to see any suggestions, useful links to articles and books, and some advice. I don't want to get tools, I just want to get knowledge to make such tools by myself.
+1

Re: Debugging applications on TV

Posted: Wed Feb 19, 2014 12:19 pm
by ARCHANGEL
https://sourceware.org/gdb/wiki/Buildin ... dGDBserver

Here I found info about building gdb for crossplatform debugging, how do you think am I on the right way?

Re: Debugging applications on TV

Posted: Fri Feb 21, 2014 3:48 pm
by ARCHANGEL
I tried a many-many tuts to build my toolchain or/and to build my crosscompiler to build the crossplatform version of gdb and I have no successful results. I still have no idea, how to build crossplatform debugger. I tried^
http://www.ailis.de/~k/archives/19-arm- ... howto.html
http://www.microbuilder.eu/Tutorials/So ... chain.aspx
http://acassis.wordpress.com/2013/02/10 ... 5-for-arm/
http://autosysprogs.blogspot.com.br/201 ... vices.html

And during all my tries I found that something goes wrong and not like in the tutorial. Can somebody give me just a link on video or tut how I can build debugger for my tv?

Re: Debugging applications on TV

Posted: Sat Feb 22, 2014 1:43 am
by sectroyer
ARCHANGEL wrote:I tried a many-many tuts to build my toolchain or/and to build my crosscompiler to build the crossplatform version of gdb and I have no successful results. I still have no idea, how to build crossplatform debugger. I tried^
http://www.ailis.de/~k/archives/19-arm- ... howto.html
http://www.microbuilder.eu/Tutorials/So ... chain.aspx
http://acassis.wordpress.com/2013/02/10 ... 5-for-arm/
http://autosysprogs.blogspot.com.br/201 ... vices.html

And during all my tries I found that something goes wrong and not like in the tutorial. Can somebody give me just a link on video or tut how I can build debugger for my tv?
Forget about it. Debugging doesn't work correctly for any of us:) At least if you want to debug exeDSP/exeTV/exeAPP;)

Re: Debugging applications on TV

Posted: Mon Feb 24, 2014 10:07 am
by ARCHANGEL
It's interesting, why the debugging doesn't work?

Re: Debugging applications on TV

Posted: Tue Feb 25, 2014 8:18 pm
by sectroyer
ARCHANGEL wrote:It's interesting, why the debugging doesn't work?
Because gdb (or any other debugger) in order to debug multi threaded application on linux can only do so if the application uses debugging version of libpthread and exeDSP uses STRIPED version of libpthread :)

Re: Debugging applications on TV

Posted: Wed Feb 26, 2014 9:45 am
by ARCHANGEL
sectroyer
Thanks for your participation. I'll think about that info.

Re: Debugging applications on TV

Posted: Wed Feb 26, 2014 5:18 pm
by sectroyer
ARCHANGEL wrote:sectroyer
Thanks for your participation. I'll think about that info.
If you want to play around with debugging I would suggest MemHook... ;)