Debugging applications on TV

Ideas and dreaming will go this forum
Post Reply

ARCHANGEL
Posts: 5
Joined: Tue Feb 18, 2014 2:15 pm

Debugging applications on TV

Post 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.
tempinbox
Posts: 317
Joined: Wed May 11, 2011 7:00 pm

Re: Debugging applications on TV

Post 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
ARCHANGEL
Posts: 5
Joined: Tue Feb 18, 2014 2:15 pm

Re: Debugging applications on TV

Post 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?
ARCHANGEL
Posts: 5
Joined: Tue Feb 18, 2014 2:15 pm

Re: Debugging applications on TV

Post 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?
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: Debugging applications on TV

Post 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;)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
ARCHANGEL
Posts: 5
Joined: Tue Feb 18, 2014 2:15 pm

Re: Debugging applications on TV

Post by ARCHANGEL »

It's interesting, why the debugging doesn't work?
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: Debugging applications on TV

Post 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 :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
ARCHANGEL
Posts: 5
Joined: Tue Feb 18, 2014 2:15 pm

Re: Debugging applications on TV

Post by ARCHANGEL »

sectroyer
Thanks for your participation. I'll think about that info.
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: Debugging applications on TV

Post 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... ;)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

Post Reply

Return to “[F] Brainstorm”