SH1NU11b1

V_X_POC

May 13th, 2015
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.34 KB | None | 0 0
  1. More and more companies and institutions are intercepting SSL/TLS connections with MITM attacks in order to analyze traffic between 2 computers. Security companies pimp out "Counter Threat Systems" which promise all kinds of hi tech defense capabilities against attacks for thousands of dollars per month. Sometimes these systems are worthless.
  2. If you are trying to tunnel an outbound connection over port 443 or 80 because the admin blocks everything else, they will likely terminate the connection once realizing the traffic is invalid HTTP data.
  3. I was thinking what other ways are available, but specifically through existing popular online services which wouldn't look as suspicious to an administrator.
  4. It would need to support some kind of asynchronous communication so that the connection is "always on" rather than intermittent which only heightens further suspicion about what is going on.
  5. Skype was one service which would have worked well as it already had an SDK but unfortunately M$ decided to discontinue next month in favor of URI.
  6. There could potentially be tunnels developed for many online services.
  7. Facebook online chat is one possible avenue....let's examine that.
  8. Say Computer A is Alice (Virus) and Computer B is Bob (You)
  9. Alice -> Connect Facebook
  10. Alice -> send Login
  11. Bob -> Connect Facebook
  12. Bob -> send Login
  13. Now if we want to tunnel data between each computer, Facebook chat provides way to do it.
  14. Of course, there are limitations to this such as latency issues, there are also many companies that might block it completely...but never the less, it could prove quite useful in some scenarios.
  15. Imagine Alice is waiting for input from the chat which is redirected to cmd.exe or some other application capable of accepting command input.
  16. Bob -> SendInput ("dir") -> Alice
  17. Alice -> SendOutput ("dir") -> Bob
  18. Dropbox and some other online storage services have potential too but until the protocol is well understood, unlikely a tunnel would be written for them.
  19. Probably the stealthiest tunnel would make use of stenography, delivering commands through some arbitrary file format so the eyes of admin are completely unaware it's covert data.
  20. Strong encryption should be used for all this too...
  21. Thumbs up Thumbs down
  22. 2Hecktor2013-11-27 17:08:23 (edited by Hecktor 2013-11-27 17:09:26)
  23. Member
  24. Offline
  25. Registered: 2011-01-13
  26. Posts: 99
  27. User Karma: 8
  28. well, facebook chat runs over jabber protocol, so i would say, if you added a new layer over jabber (i mean, not manipulating the jabber/xmpp protocol), you can add custom protocol, such as taking the handshake of SSL/TLS and convert it to Base64/Base91/Binary-To-HexString, morph the data a bit (replace constant patterns with specific valid english words from a predefined dictionary, add some spaces, and finally send it as a user messages) this way it would require manual analysis to define if it's a handshake or encrypted data.
  29. but still, it can be attacked using MITM if the protocol was published or the exe has been reversed. but ofc it's less likely to be done than normal TLS/SSL.
  30. Thumbs up Thumbs down
  31. 3sulfur2013-11-27 17:59:11
  32. Member
  33. Offline
  34. From: United Kingdom
  35. Registered: 2013-11-01
  36. Posts: 62
  37. User Karma: 6
  38. Good idea. I wonder could WinInet make this work.
  39. Say Alice binds to a socket, then the WinInet proxy settings point to local machine so everything is routed through the local socket which gets wrapped with Jabber protocol before being sent to Facebook in order to establish SSL/TLS connection with Bob on other end.
  40. To simplify it, maybe just use Diffie Hellman key exchange along with symmetric encryption.
  41. This would be vulnerable to MITM too of course but only if protocol already understood as you say.
  42. Thumbs up Thumbs down
  43. 4Hecktor2013-11-27 22:20:10
  44. Member
  45. Offline
  46. Registered: 2011-01-13
  47. Posts: 99
  48. User Karma: 8
  49. you don't need wininet, facebook already provides a direct jabber/xmpp interface
  50. https://www.facebook.com/sitetour/chat.php
  51. Thumbs up Thumbs down
  52. 5sulfur2013-11-28 04:44:35 (edited by sulfur 2013-11-28 05:30:22)
  53. Member
  54. Offline
  55. From: United Kingdom
  56. Registered: 2013-11-01
  57. Posts: 62
  58. User Karma: 6
  59. I just meant handling the ssl/tls connection.
  60. But even though schannel is more difficult to implement, might work better than wininet for this purpose.
  61. Thumbs up Thumbs down
  62. 6sulfur2013-11-28 06:21:20
  63. Member
  64. Offline
  65. From: United Kingdom
  66. Registered: 2013-11-01
  67. Posts: 62
  68. User Karma: 6
  69. Just looking at LibJingle
  70. https://developers.google.com/talk/libjingle/
  71. Seems like RemoteVNC already uses this for screen sharing to bypass some firewalls.
  72. Thumbs up Thumbs down
  73. 7infodox2014-01-20 23:07:37
  74. Member
  75. Offline
  76. Registered: 2014-01-20
  77. Posts: 12
  78. User Karma: 4
  79. This is an example of doing a shell over XMPP protocol.
  80. https://github.com/fabianp/xmpp-shell
  81. I may fork that later and make it a little better than it is, could use some work imo. I think it would work over any XMPP service, like, I think Gtalk still has a working XMPP interface?
  82. WebsiteThumbs up +1 Thumbs down
  83. 8g0at2014-02-05 19:50:13
  84. New member
  85. Offline
  86. Registered: 2014-02-05
  87. Posts: 1
  88. i dont know about tunnels but i use OTR from cypherpunks.ca with jabber/xmpp
  89. Thumbs up Thumbs down
  90. 9infodox2014-02-07 17:34:23
  91. Member
  92. Offline
  93. Registered: 2014-01-20
  94. Posts: 12
  95. User Karma: 4
  96. Here is an implementation of VNC over XMPP.
  97. https://code.google.com/p/vncviaxmpp/
  98. I have not tested it yet, but it looks somewhat promising.
  99. WebsiteThumbs up +1 Thumbs down
  100. 10sulfur2014-02-08 05:23:34
  101. Member
  102. Offline
  103. From: United Kingdom
  104. Registered: 2013-11-01
  105. Posts: 62
  106. User Karma: 6
  107. xmpp is definitely a good way to transport data over various services.
  108. Thumbs up Thumbs down
  109. 11jamesmadison2014-09-10 19:58:20
  110. New member
  111. Offline
  112. Registered: 2014-09-10
  113. Posts: 3
  114. If you have the capability, you can go a little more out of band with something like this:
  115. https://github.com/lulzlabs/AirChat
  116. Not sure you can get good video but for C2, it has potential. Obviously has some drawbacks but thought I would mention it.
  117. Thumbs up Thumbs down
  118. 12blm222014-10-10 04:53:19
  119. Member
  120. Offline
  121. Registered: 2010-01-07
  122. Posts: 427
  123. User Karma: 21
  124. http://xmpp.org/extensions/xep-0234.pdf
  125. If you enjoy my work or ideas please click thumbs up! big_smile
  126. I am a 22 year old Composer, Musician, Programmer, Linux User, Android ROM and Developer, Ubuntu Touch HomeBrew Developer, and Open webOS(Lune OS[Android Based]) Developer.
  127. Thumbs up Thumbs down
Advertisement
Add Comment
Please, Sign In to add comment