内网渗透-判断内网连通性

VSole2022-01-15 07:10:02

判断内网的连通性是指判断机器能否上外网等。需要综合判断各种协议(TCP、HTTP、DNS、ICMP等)及端口通信的方式。

查看本机防火墙规则

netsh advfirewall firewall show rule name=all

基于ICMP协议

使用ping命令:

ping <IP地址或域名>

TCP协议

netcat(简称nc)被誉为网络安全界的”瑞士军刀”,是一个短小精悍的工具,通过使用TCP或UDP协议的网络连接读取数据。

使用方法:

nc -zv <IP地址 端口号>

Windows机器不自带nc,因此在Windows机器上需要使用Telnet,而Telnet也需要我们自己开启。

Windows10下开启Telnet命令:

#开启
dism /online /Enable-Feature /FeatureName:TelnetClient#关闭
dism /online /Disable-Feature /FeatureName:TelnetClient

Telnet使用方法:

telnet <IP地址 端口号>

UDP协议

使用脚本 Test-PortConnectivity.ps1

下载地址:https://gist.github.com/PrateekKumarSingh/61532b4f48edac1d893b

#Test-PortConnectivity -Source '127.0.0.1' -RemoteDestination 'dc1' -Port 57766#Test-PortConnectivity '127.0.0.1' 'dc1' 57766 -Protocol UDP -Iterate#Test-PortConnectivity 'localhost' 'dc2' 51753 -Protocol UDP#Test-PortConnectivity -Source $EUCAS -RemoteDestination $EUMBX -Port 135 -Iterate#Test-PortConnectivity -Source 'localhost' -RemoteDestination '127.0.0.1' -Port 135 -Iterate -protocol TCPFunction Test-PortConnectivity(){Param(
    [Parameter(Position=0)] $Source,
    [Parameter(Mandatory=$true,Position=1)] $RemoteDestination,
    [Parameter(Mandatory=$true,Position=2)][ValidateScript({
      
      If($_ -match "^[0-9]+$"){
      $True
      }
      else{
      Throw "A port should be a numeric value, and $_ is not a valid number"
      }
    })
    ]$Port,
    [Parameter(Position=3)][ValidateSet('TCP','UDP')] $Protocol = 'TCP',
    [Switch] $Iterate
)
    #If $source is a local name, invoke command is not required and we can test port, withhout credentials
    If($Source -like "127.*" -or $source -like "*$(hostname)*" -or $Source -like 'localhost')
    {
        Do
        {
                Telnet-Port $RemoteDestination $Port $Protocol;
                Start-Sleep -Seconds 1   #Initiate sleep to slow down Continous telnet
        }While($Iterate)
       
    }
    Else  #Prompt for credentials when Source is not the local machine.
    {     
        $creds = Get-Credential
        Do
        {
            Foreach($Src in $Source)
            {          
            Invoke-command -ComputerName $Src -Credential $creds -ScriptBlock ${Function:Telnet-Port} -ArgumentList $RemoteDestination,$port, $Protocol                                            
            }
            #Initiate sleep to slow down Continous telnet
            Start-Sleep -Seconds 1
        }While($Iterate)
       
    }}
  
Function Telnet-Port($RemoteDestination, $port, $Protocol){
    foreach($Target in $RemoteDestination)
    {
            Foreach($CurrentPort in $Port)
            {
                If($Protocol -eq 'TCP')
                {
                    
                    try
                    {
                        If((New-Object System.Net.Sockets.TCPClient ($Target,$currentPort) -ErrorAction SilentlyContinue).connected)
                        {
                            Write-host "$((hostname).toupper()) connected to $($Target.toupper()) on $Protocol port : $currentPort " -back green -ForegroundColor White
                        }
                    }
                    catch
                    {
                            Write-host "$((hostname).toupper()) Not connected to $($Target.toupper()) on $Protocol port : $currentPort" -back red -ForegroundColor white
                    }            
                }
                Else
                {   
                                                              
                    #Create object for connecting to port on computer   
                    $UDPClient = new-Object system.Net.Sockets.Udpclient 
                    
                    #Set a timeout on receiving message, to avoid source machine to Listen forever. 
                    $UDPClient.client.ReceiveTimeout = 5000 
                    
                    #Datagrams must be sent with Bytes, hence the text is converted into Bytes
                    $ASCII = new-object system.text.asciiencoding
                    $Bytes = $ASCII.GetBytes("Hi")
                    
                    #UDP datagram is send
                    [void]$UDPClient.Send($Bytes,$Bytes.length,$Target,$Port)  
                    $RemoteEndpoint = New-Object system.net.ipendpoint([system.net.ipaddress]::Any,0)  
                     
                        Try
                        {
                            #Waits for a UDP response until timeout defined above
                            $RCV_Bytes = $UDPClient.Receive([ref]$RemoteEndpoint)  
                            $RCV_Data = $ASCII.GetString($RCV_Bytes) 
                            If ($RCV_Data) 
                            {
                           
                                Write-host "$((hostname).toupper()) connected to $($Target.toupper()) on $Protocol port : $currentPort " -back green -ForegroundColor White
                            }
                        }
                        catch
                        {
                            #if the UDP recieve is timed out
                            #it's infered that no response was received.
                            Write-host "$((hostname).toupper()) Not connected to $($Target.toupper()) on $Protocol port : $currentPort " -back red -ForegroundColor White
                        }
                        Finally
                        {
                            #Disposing Variables
                            $UDPClient.Close()
                            $RCV_Data=$RCV_Bytes=$null
                        }                                    
                }
             }
     }}

使用方法:

powershell -exec bypass -command "& {import-module C:\Users\GU\Desktop\Test-PortConnectivity.ps1; Test-PortConnectivity 'localhost' '127.0.0.1' 7777 -Iterate -protocol UDP}"

我们先在本机使用ncat开启udp监听,再运行此脚本。

只要监听处出现Hi字样,即表示连通。

HTTP协议

使用工具curl,有的Windows自带curl,有的需要自己安装。

使用方法:

curl www.baidu.com

FTP协议

远程开启21端口,并使用ftp连接。

DNS协议

Windows下使用nslookup,linux下还可以使用dig。

#Windows
nslookup www.baidu.com
#Linux
dig www.baidu.com

或者给自己加一个txt记录

使用命令:

nslookup -type=TXT test.hackergu.com

利用工具查看开放端口

HostRecon

下载地址:https://github.com/dafthack/HostRecon

使用命令:

Import-Module .\HostRecon.ps1
Invoke-HostRecon -Portscan -TopPorts 128

代理服务器

在内网中的机器,也可能是通过代理连接内网。

检查方法:

  1. 查看内网中,与其他机器的网络连接。
  2. 查看内网中是否有主机名类似于proxy的机器。
  3. 根据pac文件的路径,将其下载下来并查看。
  4. 执行如下命令,进行确认。
curl -x proxy-ip:port www.baidu.com
test
本作品采用《CC 协议》,转载必须注明作者和本文链接
AV-TEST 和 AV-Comparatives 是两家知名的反恶意软件评估公司。尽管久负盛名,但是前者遇到了一件尴尬的事情:官方 Twitter 账号于 7 月 25 日被黑了,但时间过去 1 周仍未恢复对其的控制。
前不久,国际权威测评机构AV-TEST发布了最新的企业安全产品测评结果,在测评的19个企业级终端安全产品中,深信服EDR在检测能力、性能消耗以及可用性三个评估维度拿到了全部满分(6分为满分)的好成绩,也是国内首个全部满分的终端安全产品,意味着深信服EDR在终端安全防护能力上获得了的专业肯定与认可。
AV-TEST统计数据显示,2022年在Windows平台上发现了近 7000 万个新的恶意软件样本;macOS 上只有大约 1.2 万个恶意软件。
编写测试代码和编写普通的Go代码过程是类似的,并不需要学习新的语法、规则或工具。go test命令是一个按照一定约定和组织的测试代码的驱动程序。
主要测试思路xss:test+()@example.com. Header注入"%0d%0aContent-Length:%200%0d%0a%0d%0a"@example.com. "recipient@test.com>\r\nRCPT TO:test.com
它通过解压缩 APK 并应用一系列规则来检测这些漏洞来做到这一点https://github.com/SUPERAndroidAnalyzer/super9、AndroBugs 框架是一种高效的 Android 漏洞扫描程序,可帮助开发人员或黑客发现 Android 应用程序中的潜在安全漏洞。它可以修改任何主进程的代码,不管是用Java还是C/C++编写的。
在整个软件开发生命周期中,可以在开发与测试阶段中使用IAST工具。之后启动tomcat,查看agent是否正常上线。再看一下请求信息,通过请求信息找一下代码入口,入口是在DocController.java的deleteDoc方法中。529行调用deleteDoc,跟入deleteDoc函数。deleteRealDoc中直接对原始请求参数进行拼接,完成文件删除,触发漏洞。通过数据流图也可以初步判断漏洞是否存在,假如通过修改传入的污点值可以在最后危险函数处进行漏洞触发,即可认为是存在漏洞的。
位于德国的IT安全研究机构AV-TEST发布了针对Windows 10家庭用户的2021年10月最佳杀毒程序评估报告。
|常见扫描器特征
2021-10-28 07:42:24
by_wvs. acunetix. acunetix_wvs. acunetix_test. headersAcunetix-Aspect-Password:. Cookie: acunetixCookie. Cookie: acunetix.
常见扫描器特征
2021-10-25 04:13:52
url acunetix-wvs-test-for-some-inexistent-file by_wvs acunetix_wvs_security_test acunetix acunetix_wvs acunetix_test
VSole
网络安全专家