proxytunnle                                           

通过标准的HTTP/HTTPS代理创建隧道的工具                

通过HTTP CONNECT 方法封装信息                         

适用于内网使用代理并且防火墙只允许代理服务器上网的场景

无法创建DNS隧道和ICMP隧道

proxytunnle                                                          

实验一:将外网资源映射为内网指定端口                                  

    - 内网安装squid3代理、proxytunnle                                 

      vi /etc/squid3/squid.conf                                       

      /^http_port                                                    

      /^http_access                                                  

      /^acl                                                           

    - 创建隧道:proxytunnle -a 80 -p 127.0.0.1:3128 -d 192.168.1.1:80

yuanfh@Bodhi:~$ sudo apt-get install squid

squid                  squidclient             squid-langpack

squid3                 squid-deb-proxy         squid-prefetch

squid3-common          squid-deb-proxy-client  squid-purge

squid3-dbg             squidguard              squidtaild

squid3-cgi             squidguard-doc          squidview

yuanfh@Bodhi:~$ sudo apt-get install squid3

yuanfh@Bodhi:~$ sudo netstat -pantu | grep :3128

tcp6       0      0 :::3128                     :::*                LISTEN      2026/squid3

yuanfh@Bodhi:~$ sudo vi /etc/squid3/squid.conf

/^http_port

http_port 1.1.1.10:3128

/^http_access

http_access allow !Safe_port

http_access allow CONNECT !SSL_port

http_access allow all

/^acl

acl SSL_port port 443

acl Safe_port port 80          # http

acl Safe_port port 21          # ftp

acl Safe_port port 443         # https

acl Safe_port port 70          # gopher

acl Safe_port port 210         # wais

acl Safe_port port 1025-65535  # unregistered ports

acl Safe_port port 280         # http-mgmt

acl Safe_port port 488         # gss-http

acl Safe_port port 591         # filemaker

acl Safe_port port 777         # multiling http

acl CONNEC method CONNECT

:wq

yuanfh@Bodhi:~$ sudo squid3 -k kill

yuanfh@Bodhi:~$ sudo netstat -pantu | grep 3128

tcp6       0      0 1.1.1.10:3128               :::*                LISTEN     2193/squid3

yuanfh@Bodhi:~$ sudo squid3 -k kill

yuanfh@Bodhi:~$ sudo netstat -pantu | grep 3128

tcp6       0      0 1.1.1.10:3128               :::*                LISTEN     2212/squid3

yuanfh@Bodhi:~$ sudo squid3 -k kill

yuanfh@Bodhi:~$ sudo netstat -pantu | grep 3128

tcp6       0      0 1.1.1.10:3128               :::*                LISTEN     2231/squid3

yuanfh@Bodhi:~$ sudo apt-get install proxytunnel

root@K:~# sudo netstat -pantu

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address            Foreign Address        State       PID/Program name

tcp        0      0 127.0.0.1:9390           0.0.0.0*               LISTEN      591/openvasmd

tcp        0      0 127.0.0.1:9391           0.0.0.0*               LISTEN      849/openvassd: Relo

tcp        0      0 127.0.0.1:9392           0.0.0.0*               LISTEN      590/gsad

tcp        0      0 127.0.0.1:80             0.0.0.0*               LISTEN      817/gsad

tcp        0      0 192.168.1.110:80         106.10.160.140:80      TIME_WAIT    -

tcp        0      0 0.0.0.0:68               0.0.0.0*                           848/dhclient

root@K:~# openvas-stop

Stopping OpenVas Services

root@K:~# sudo netstat -pantu

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address            Foreign Address        State       PID/Program name

tcp        0      0 0.0.0.0:68               0.0.0.0*                           848/dhclient

root@K:~# service apache2 start

yuanfh@Bodhi:~$ sudo netstat -pantu | grep :80

yuanfh@Bodhi:~$ sudo proxytunnel -a 80 -p 1.1.1.10:3128 -d 192.168.1.110:80

[sudo] password for yuanfh:

yuanfh@Bodhi:~$ sudo netstat -pantu | grep :80

tcp        0      0 0.0.0.0:80               0.0.0.0*                           2042/proxytunnel

yuanfh@Bodhi:~$ sudo vi /etc/squid3/squid.conf

/^http_port

http_port 1.1.1.10:3128

/^http_access

http_access allow !Safe_port

http_access allow CONNECT !SSL_port

http_access allow all

/^acl

acl SSL_port port 443

acl Safe_port port 80          # http

acl Safe_port port 21          # ftp

acl Safe_port port 443         # https

acl Safe_port port 70          # gopher

acl Safe_port port 210         # wais

acl Safe_port port 1025-65535  # unregistered ports

acl Safe_port port 280         # http-mgmt

acl Safe_port port 488         # gss-http

acl Safe_port port 591         # filemaker

acl Safe_port port 777         # multiling http

acl CONNEC method CONNECT

:wq

yuanfh@Bodhi:~$ sudo squid3 -k shutdown

yuanfh@Bodhi:~$ sudo netstat -pantu | grep 3128

tcp        0      0 1.1.1.10:3128           1.1.1.11:41882          ESTABLISHED 2231/squid3

tcp        0      0 1.1.1.10:3128           1.1.1.11:41884          ESTABLISHED 2231/squid3

tcp        0      0 1.1.1.10:3128           1.1.1.11:41880          ESTABLISHED 2231/squid3

yuanfh@Bodhi:~$ sudo squid3

yuanfh@Bodhi:~$ sudo netstat -pantu | grep 3128

tcp        0      0 1.1.1.1:3128           1.1.1.11:41882          FIN_WAIT1   yuanfh@Bodhi:~$ sudo squid3

yuanfh@Bodhi:~$ sudo netstat -pantu | grep 3128

tcp        0      0 1.1.1.10:3128           1.1.1.11:41882          ESTABLISHED 2231/squid3

tcp        0      0 1.1.1.10:3128           1.1.1.11:41884          ESTABLISHED 2231/squid3

tcp        0      0 1.1.1.10:3128           1.1.1.11:41880          ESTABLISHED 2231/squid3

tcp        0      0 1.1.1.10:3128           1.1.1.11:41884          ESTABLISHED 2231/squid3

tcp        0      0 1.1.1.10:3128           1.1.1.11:41880          ESTABLISHED 2231/squid3

yuanfh@Bodhi:~$ sudo squid3

yuanfh@Bodhi:~$ sudo netstat -pantu | grep 3128

tcp        0      0 1.1.1.10:3128           1.1.1.11:41882          FIN_WAIT1   -

tcp        0      0 1.1.1.10:3128           1.1.1.11:41884          FIN_WAIT1   -

tcp        0      0 1.1.1.10:3128           1.1.1.11:41880          FIN_WAIT2   -

yuanfh@Bodhi:~$ sudo squid3 start

yuanfh@Bodhi:~$ sudo netstat -pantu | grep 3128

tcp        0      0 1.1.1.10:3128           0.0.0.0:*               LISTEN      2323/(squid-1)

tcp        0      0 1.1.1.10:3128           1.1.1.11:41882          FIN_WAIT1   -

tcp        0      0 1.1.1.10:3128           1.1.1.11:41884          FIN_WAIT1   -

tcp        0      0 1.1.1.10:3128           1.1.1.11:41880          FIN_WAIT2   -

不使用代理

http://127.0.0.1:81

proxytunnle                                                             

实验二:外网资源非防火墙允许端口                                        

    - 修改目标资源侦听端口可能无法躲避防火墙深层检测                    

    - 外网安装squid3代理服务器并侦听80端口                              

    - 创建隧道:proxytunnle -a 80 -p 127.0.0.1:3128 -r 192.168.1.1:80 -d

      192.168.1.1:22

root@K:~# sudo netstat -pantu

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address            Foreign Address        State       PID/Program name

tcp        0      0 :::80                    :::*                   LISTEN      2231/apache2

tcp        0      0 :::9876                  :::*                   LISTEN      82231/apache2

tcp        0      0 127.0.0.1:68             0.0.0.0*               LISTEN      848/dhclient

root@K:~# service apache2 stop

root@K:~# apt-get install squid3

root@K:~# sudo vi /etc/squid3/squid.conf

/^http_port

http_port 192.168.1.110:80

/^http_access

http_access allow !Safe_port

http_access allow CONNECT !SSL_port

http_access allow all

/^acl

acl SSL_port port 443

acl Safe_port port 80          # http

acl Safe_port port 21          # ftp

acl Safe_port port 443         # https

acl Safe_port port 70          # gopher

acl Safe_port port 210         # wais

acl Safe_port port 1025-65535  # unregistered ports

acl Safe_port port 280         # http-mgmt

acl Safe_port port 488         # gss-http

acl Safe_port port 591         # filemaker

acl Safe_port port 777         # multiling http

acl CONNEC method CONNECT

:wq

root@K:~# netstat -pantu | grep :22

root@K:~# netstat -pantu | grep :3128

root@K:~# netstat -pantu | grep :80

tcp        0      0 192.168.1.110.80         0.0.0.0:*              LISTEN      4627/(squid-1)

tcp        0      0 127.0.0.1:8087           0.0.0.0:*              LISTEN      3552/python2.7

tcp        0      0 192.168.1.110:55258      106.10.160.140:80      TIME_WAIT   -

root@K:~# service squid start

root@K:~# vi /etc/ssh/sshd_config

PermitRootLogin yes

PasswordAuthentication yes

:wq

root@K:~# service ssh start

root@K:~# netstat -pantu | grep :22

tcp        0      0 192.168.1.110.80         0.0.0.0:*              LISTEN      4693/sshd

tcp        0      0 127.0.0.1:8087           0.0.0.0:*              LISTEN      4693/sshd

root@K:~# netstat -pantu | grep :80

tcp        0      0 192.168.1.110.80         0.0.0.0:*              LISTEN      4627/(squid-1)

tcp        0      0 127.0.0.1:8087           0.0.0.0:*              LISTEN      3552/python2.

yuanfh@Bodhi:~$ sudo proxytunnel -a 2222 -p 1.1.1.10:3128 -d 192.168.1.110:80 -d 192.168.1.110:22

yuanfh@Bodhi:~$ sudo netstat -pantu | grep :2222

[sudo] password for yuanfh:

tcp        0      0 0.0.0.0:2222             0.0.0.0*                           2042/proxytunnel

yuanfh@Bodhi:~$ ssh root@127.0.0.1 -p 2222

The authenticity of host '[127.0.0.1]:2222 ([127.0.0.1]:2222)' can't be established.

ECDSA key fingerprint is 6f:6f:fc:e5:d0:96:65:34:99:7d:81:06:b6:5e:44:50.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.

root@127.0.0.1's password:

The programs included with the Kali GHU/Linux system are free softwere:

the exact distribution terms for each program are described in the indicidual files in  /usr/share/doc/*/copyright.

Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY. to the extent

permitted by applicable law.

yuanfh@Bodhi:~$ sudo proxytunnel -a 888 -p 1.1.1.10:3128 -d 192.168.1.110:80 -d 192.168.1.110:22

proxytunnle                                                                          

实验三:ssh客户端配置自动创建代理链隧道                                              

    - vi ~/.ssh/config                                                               

      Host 192.168.1.1                                                                

          Hostname 192.168.1.1                                                       

          ProtocolKeepAlives 30                                                      

          ProxyCommand /usr/bin/proxytunnel -p 1.1.1.1:3128 -r 192.168.1.1:80 -d %h:%p

yuanfh@Bodhi:~$ cd .ssh/

yuanfh@Bodhi:~/.ssh$ ls

known_hosts

yuanfh@Bodhi:~/.ssh$ vi config

 Host 192.168.1.1

    Hostname 192.168.1.1

    ProtocolKeepAlives 30

    ProxyCommand /usr/bin/proxytunnel \

        -p 1.1.1.1:3128 \

        -r 192.168.1.1:80 -d %h:%p \

        -H "User-Agent:Mozilla/4.0(compatible;MSIE 6.0;Win32)"

yuanfh@Bodhi:~/.ssh$ ssh root@192.168.1.110:22

该笔记为安全牛课堂学员笔记,想看此课程或者信息安全类干货可以移步到安全牛课堂

Security+认证为什么是互联网+时代最火爆的认证?


      牛妹先给大家介绍一下Security+


        Security+ 认证是一种中立第三方认证,其发证机构为美国计算机行业协会CompTIA ;是和CISSP、ITIL 等共同包含在内的国际 IT 业 10 大热门认证之一,和CISSP偏重信息安全管理相比,Security+ 认证更偏重信息安全技术和操作。

       通过该认证证明了您具备网络安全,合规性和操作安全,威胁和漏洞,应用程序、数据和主机安全,访问控制和身份管理以及加密技术等方面的能力。因其考试难度不易,含金量较高,目前已被全球企业和安全专业人士所普遍采纳。

Security+认证如此火爆的原因?  

       原因一:在所有信息安全认证当中,偏重信息安全技术的认证是空白的, Security+认证正好可以弥补信息安全技术领域的空白 。

      目前行业内受认可的信息安全认证主要有CISP和CISSP,但是无论CISP还是CISSP都是偏重信息安全管理的,技术知识讲的宽泛且浅显,考试都是一带而过。而且CISSP要求持证人员的信息安全工作经验都要5年以上,CISP也要求大专学历4年以上工作经验,这些要求无疑把有能力且上进的年轻人的持证之路堵住。在现实社会中,无论是找工作还是升职加薪,或是投标时候报人员,认证都是必不可少的,这给年轻人带来了很多不公平。而Security+的出现可以扫清这些年轻人职业发展中的障碍,由于Security+偏重信息安全技术,所以对工作经验没有特别的要求。只要你有IT相关背景,追求进步就可以学习和考试。

       原因二: IT运维人员工作与翻身的利器。

       在银行、证券、保险、信息通讯等行业,IT运维人员非常多,IT运维涉及的工作面也非常广。是一个集网络、系统、安全、应用架构、存储为一体的综合性技术岗。虽然没有程序猿们“生当做光棍,死亦写代码”的悲壮,但也有着“锄禾日当午,不如运维苦“的感慨。天天对着电脑和机器,时间长了难免有对于职业发展的迷茫和困惑。Security+国际认证的出现可以让有追求的IT运维人员学习网络安全知识,掌握网络安全实践。职业发展朝着网络安全的方向发展,解决国内信息安全人才的匮乏问题。另外,即使不转型,要做好运维工作,学习安全知识取得安全认证也是必不可少的。

        原因三:接地气、国际范儿、考试方便、费用适中!

CompTIA作为全球ICT领域最具影响力的全球领先机构,在信息安全人才认证方面是专业、公平、公正的。Security+认证偏重操作且和一线工程师的日常工作息息相关。适合银行、证券、保险、互联网公司等IT相关人员学习。作为国际认证在全球147个国家受到广泛的认可。

        在目前的信息安全大潮之下,人才是信息安全发展的关键。而目前国内的信息安全人才是非常匮乏的,相信Security+认证一定会成为最火爆的信息安全认证。