domingo, 23 de agosto de 2020

Trendnet Cameras - I Always Feel Like Somebody'S Watching Me.

Firstly this post requires the following song to be playing.

Now that we got that out of the way... I have been seeing posts on sites with people having fun with embedded systems/devices and I was feeling left out. I didn't really want to go out and buy a device so I looked at what was laying around. 

To start off the latest firmware for this device can be found at the following location :

First order of business was to update the camera with the most recent firmware:
Device info page confirming firmware version
Now that the device was using the same version of firmware as I was going to dive into, lets get to work. I will be using binwalk to fingerprint file headers that exist inside the firmware file. Binwalk can be downloaded from the following url: http://code.google.com/p/binwalk/

Running binwalk against the firmware file 
binwalk FW_TV-IP110W_1.1.0-104_20110325_r1006.pck 
DECIMAL   HEX       DESCRIPTION
-------------------------------------------------------------------------------------------------------
32320     0x7E40     gzip compressed data, from Unix, last modified: Thu Mar 24 22:59:08 2011, max compression
679136     0xA5CE0   gzip compressed data, was "rootfs", from Unix, last modified: Thu Mar 24 22:59:09 2011, max compression
Looks like there are two gzip files in the "pck" file. Lets carve them out using 'dd'. First cut the head off the file and save it off as '1_unk'
#dd if=FW_TV-IP110W_1.1.0-104_20110325_r1006.pck of=1_unk bs=1 count=32320
32320+0 records in
32320+0 records out
32320 bytes (32 kB) copied, 0.167867 s, 193 kB/s
Next cut out the first gzip file that was identified, we will call this file '2'
#dd if=FW_TV-IP110W_1.1.0-104_20110325_r1006.pck of=2 bs=1 skip=32320 count=646816
646816+0 records in
646816+0 records out
646816 bytes (647 kB) copied, 2.87656 s, 225 kB/s
Finally cut the last part of the file out that was identified as being a gzip file, call this file '3'
#dd if=FW_TV-IP110W_1.1.0-104_20110325_r1006.pck of=3 bs=1 skip=679136
2008256+0 records in
2008256+0 records out
2008256 bytes (2.0 MB) copied, 8.84203 s, 227 kB/s
For this post I am going to ignore files '1_unk' and '2' and just concentrate on file '3' as it contains an interesting bug :) Make a copy of the file '3' and extract it using gunzip
#file 3
3: gzip compressed data, was "rootfs", from Unix, last modified: Thu Mar 24 22:59:09 2011, max compression
#cp 3 3z.gz
#gunzip 3z.gz
gzip: 3z.gz: decompression OK, trailing garbage ignored
#file 3z
3z: Minix filesystem, 30 char names
As we can see the file '3' was a compressed Minix file system. Lets mount it and take a look around.
#mkdir cameraFS
#sudo mount -o loop -t minix 3z cameraFS/
#cd cameraFS/
#ls
bin  dev  etc  lib  linuxrc  mnt  proc  sbin  server  tmp  usr  var
There is all sorts of interesting stuff in the "/server" directory but we are going to zero in on a specific directory "/server/cgi-bin/anony/"
#cd server/cgi-bin/anony/
#ls
jpgview.htm  mjpeg.cgi  mjpg.cgi  view2.cgi
The "cgi-bin" directory is mapped to the root directory of http server of the camera, knowing this we can make a request to http://192.168.1.17/anony/mjpg.cgi and surprisingly we get a live stream from the camera. 

video stream. giving no fucks.


Now at first I am thinking, well the directory is named "anony" that means anonymous so this must be something that is enabled in the settings that we can disable.... Looking at the configuration screen you can see where users can be configured to access the camera. The following screen shows the users I have configured (user, guest)
Users configured with passwords.

Still after setting up users with passwords the camera is more than happy to let me view its video stream by making our previous request. There does not appear to be a way to disable access to the video stream, I can't really believe this is something that is intended by the manufacturer. Lets see who is out there :)

Because the web server requires authentication to access it (normally) we can use this information to fingerprint the camera easily. We can use the realm of 'netcam' to conduct our searches 
HTTP Auth with 'netcam' realm
Hopping on over to Shodan (http://www.shodanhq.com) we can search for 'netcam' and see if there is anyone out there for us to watch
9,500 results
If we check a few we can see this is limited to only those results with the realm of 'netcam' and not 'Netcam'
creepy hole in the wall

front doors to some business
Doing this manually is boring and tedious, wouldn't it be great if we could automagically walk through all 9,500 results and log the 'good' hosts.... http://consolecowboys.org/scripts/camscan.py

This python script requires the shodan api libs http://docs.shodanhq.com/ and an API key. It will crawl the shodan results and check if the device is vulnerable and log it. The only caveat here is that the shodan api.py file needs to be edited to allow for including result page offsets. I have highlighted the required changes below.
    def search(self, query,page=1):
        """Search the SHODAN database.
     
        Arguments:
        query    -- search query; identical syntax to the website
        page     -- page number of results      

        Returns:
        A dictionary with 3 main items: matches, countries and total.
        Visit the website for more detailed information.
     
        """
        return self._request('search', {'q': query,'page':page})

Last I ran this there was something like 350 vulnerable devices that were available via shodan. Enjoy.

Update: We are in no way associated with the @TRENDnetExposed twitter account.

Read more


  1. Nsa Hacker Tools
  2. Hacking Tools Software
  3. Underground Hacker Sites
  4. Hacking Tools Pc
  5. Wifi Hacker Tools For Windows
  6. Pentest Tools Linux
  7. Hacking Tools Free Download
  8. Hacking Tools For Pc
  9. Hacker Tools For Pc
  10. Hacking Tools Name
  11. Pentest Recon Tools
  12. Pentest Tools Framework
  13. Hack Tools Pc
  14. Pentest Tools Port Scanner
  15. Github Hacking Tools
  16. Hacker Tools Free Download
  17. Hacker Search Tools
  18. Pentest Tools Android
  19. Hacking Tools 2020
  20. Pentest Tools Url Fuzzer
  21. Pentest Tools Alternative
  22. Hacking Tools Online
  23. How To Make Hacking Tools
  24. Pentest Tools Website Vulnerability
  25. Pentest Tools List
  26. Physical Pentest Tools
  27. Wifi Hacker Tools For Windows
  28. Pentest Tools Review
  29. Hacker Tools Free Download
  30. Pentest Box Tools Download
  31. Hacking Tools For Windows 7
  32. Pentest Tools Url Fuzzer
  33. Hacking Tools
  34. Hacker Tools Free Download
  35. Nsa Hack Tools
  36. New Hacker Tools
  37. Pentest Tools For Mac
  38. Hacking Tools Name
  39. Pentest Tools List
  40. Hacker Tools For Ios
  41. Hacker Search Tools
  42. Pentest Tools Tcp Port Scanner
  43. Hak5 Tools
  44. Hack Tools
  45. Hackrf Tools
  46. Tools For Hacker
  47. Black Hat Hacker Tools
  48. Hacking Tools Kit
  49. Hacking Tools Github
  50. Hack Tools Pc
  51. Hacker Tools Free Download
  52. What Are Hacking Tools
  53. Hacker Tools For Mac
  54. Hacker Security Tools
  55. Pentest Tools Framework
  56. Tools For Hacker
  57. Hack Tools Github
  58. Hacking Tools Online
  59. Tools For Hacker
  60. Hack Tool Apk
  61. Hacker Tools Software
  62. Hacker Tools Apk
  63. Hacker Tools For Pc
  64. How To Install Pentest Tools In Ubuntu
  65. Pentest Reporting Tools
  66. Hak5 Tools
  67. Hacker Security Tools
  68. Hack Tools Pc
  69. What Are Hacking Tools
  70. Growth Hacker Tools
  71. Hack Tools For Games
  72. Hacking Tools Windows 10
  73. Ethical Hacker Tools
  74. Blackhat Hacker Tools
  75. Ethical Hacker Tools
  76. Hacking Tools For Kali Linux
  77. Easy Hack Tools
  78. Hacking Tools 2020
  79. Pentest Tools Website Vulnerability
  80. Hacks And Tools
  81. Hacking Tools For Windows Free Download
  82. Hacking Tools For Beginners
  83. Hacking Tools Windows
  84. Hacker Tools Free Download
  85. Easy Hack Tools
  86. Hacking Tools Name
  87. Hacker Tools Free
  88. Nsa Hack Tools
  89. Hacker Tools Online
  90. Black Hat Hacker Tools
  91. Game Hacking
  92. Hack Apps
  93. New Hacker Tools
  94. Pentest Tools Review
  95. Pentest Tools Android
  96. How To Install Pentest Tools In Ubuntu
  97. Hacking Tools For Pc
  98. Hacker Tools Online
  99. New Hacker Tools
  100. Hacking Tools Github
  101. Pentest Tools Download
  102. Install Pentest Tools Ubuntu
  103. Hacker Tools For Pc
  104. What Are Hacking Tools
  105. Hacker Security Tools
  106. Hack Tool Apk No Root
  107. Beginner Hacker Tools
  108. Pentest Tools Framework
  109. Hack Tools Online
  110. Hack App
  111. Pentest Tools For Android
  112. Pentest Tools Url Fuzzer
  113. Pentest Tools Windows
  114. Pentest Tools Windows
  115. What Are Hacking Tools
  116. Hacking Tools 2020
  117. Hacking Tools For Windows
  118. Hacking Tools Name
  119. Pentest Tools Tcp Port Scanner
  120. Hack And Tools
  121. Hack Tools Online
  122. Best Pentesting Tools 2018
  123. Hack Tools 2019
  124. Pentest Reporting Tools
  125. Nsa Hacker Tools
  126. Pentest Tools Subdomain
  127. Hacker Search Tools

No hay comentarios: