netsh

端口设置涉及的一些命令

拜拜、爱过 提交于 2019-12-03 02:36:42
用netstat -an查看监听的端口 netsh firewall show state netsh firewall show config 用netsh.exe程序设置端口: 数据收集 收起该表格展开该表格 命令 说明 show allowedprogram 显示允许的程序。 show config 显示详细的本地配置信息。 show currentprofile 显示当前配置文件。 show icmpsetting 显示 ICMP 设置。 show logging 显示日志记录设置。 show opmode 显示操作模式。 show portopening 显示例外端口。 show service 显示服务。 show state 显示当前的状态信息。 show notifications 显示当前通知设置。 配置 收起该表格展开该表格 命令 说明 add allowedprogram 用于通过指定程序的文件名来添加例外通信。 set allowedprogram 用于修改现有允许的程序的设置。 delete allowedprogram 用于删除现有允许的程序。 set icmpsetting 用于指定允许的 ICMP 通信。 set logging 用于为 Windows 防火墙指定全局日志记录选项,或为特定连接(接口)指定日志记录选项。 set opmode 用于为

内网渗透中常用的隧道工具

匿名 (未验证) 提交于 2019-12-03 00:15:02
frp https://github.com/fatedier/frp/ frp 是一个可用于内网穿透的高性能的反向代理应用,支持 tcp, udp 协议,为 http 和 https 应用协议提供了额外的能力,且尝试性支持了点对点穿透 跨平台支持linux,win,mac 类似于ngrok,运维、开发人员经常使用它管理内网机器和调试程序,例如将内网的22,3389转发到公网,开发人员将本地web服务转发到公网调试,msf/rat远控的内网上线,可以代替前几年流行的”内网通”服务 优点:不需要免杀,支持加密传输 在有公网ip的vps上部署服务端,然后在目标的内网机器上运行客户端即可反连公网机器,根据配置把内网中的目的端口转发到公网的那台机器上。网上也有一些免费和收费frp服务,可以免去自己部署服务端。 简单示例: 服务端和客户端均支持配置文件ini运行和命令行运行,下面示例为命令行。 12 服务端:./frps -p <服务监听端口> -t <token>客户端:./frpc tcp -s <服务端ip>:<服务端端口> -r <在服务端监听的对应端口> -i <内网地址> -l <内网端口> -t <token> --ue --uc 例如通过webshell转发出该机器的3389端口 12 你的机器:./frps -p 7890 -t woshitokenWebshell:

在Windows中使用netsh命令进行端口转发

匿名 (未验证) 提交于 2019-12-03 00:12:02
netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=29999 connectaddress=192.168.64.200 connectport=80 netsh interface portproxy delete v4tov4 listenaddress=127.0.0.1 listenport=29999 netsh interface portproxy show all 来源:博客园 作者: 宁静致远呀 链接:https://www.cnblogs.com/vivfeng/p/11605811.html

netsh winsock reset

三世轮回 提交于 2019-12-02 18:51:56
winsock是windows网络编程接口,从Windows XP SP2开始内置了一条命令使用netsh能够对该接口进行修复。 netsh是一个能够通过命令行操作几乎所有网络相关设置的接口。比如设置IP,DNS,网卡,无线网络等。 netsh winsock reset: 先进入netsh 然后进入winsock这个部件 对winsock这个部件执行reset命令。 效果就是重置Winsock。对于一些WinSock被破坏导致的问题有奇效。在netsh出现之前,对于WinSock问题的修复是非常繁琐的。 来源: https://www.cnblogs.com/walkersss/p/11758435.html

Set proxy through windows command line including login parameters

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 17:13:24
I want to set a proxy throught the command line, first thing I found out is that you have to run command line with administrator rights - then the basic proxy set would be: netsh winhttp set proxy SERVER:PORT This works nice, but I also want to add a login. As you can see I've tried using netsh->winhttp, however manual does not say anything about the login part so I just tried: netsh winhttp set proxy user:password@SERVER:PORT This unfortunately does not work. Is it even possible to achieve something like this in netsh->winhttp? If so, how? If not => what windows commands should I follow?

netsh result to powershell object

流过昼夜 提交于 2019-12-02 15:32:34
问题 I am trying to work with netsh from powershell . I want see result from this command such as object, but netsh return string: netsh wlan show hostednetwork | Get-Member TypeName: System.String ... My script must work on system with rather localization, and I can't use -match for parse string to object directly. How I can solve my trouble? 回答1: You got a few alternatives, none of which are nice. 1) Read the netsh output into a string[] and use a custom record parser to create your own object.

内网端口转发[netsh]

烂漫一生 提交于 2019-12-02 01:56:00
一.利用场景 当前获取目标内网边界区域一台机器,可以通外网和内网也就是存在两块网卡,又通过其他手段获取到内网另外一台机器,但是这台机器不能出外网,所以我们可以使用windows自带netsh命令通过边界机器来连接内网不出网的机器。 二.利用手法 netsh firewall show config 查看防火墙配置 netsh firewall show state 查看当前系统防火墙状态 netsh interface portproxy show all 查看端口转发规则 如防火墙开启则需关闭防火墙: netsh advfirewall set allprofiles state off add 为增加规则, delete 为删除规则 allow 为允许连接, block 为阻断连接 in 为入站, out 为出站 name 为要显示的规则名称 在边界机上执行,把外部的某个端口的流量转发到内网指定机器的端口上这里选择内网机器的8080端口。 netsh advfirewall firewall add rule name="shell" dir=in action=allow protocol=TCP localport=53 允许本地连接53端口[入站允许] netsh interface portproxy add v4tov4 listenport

Using netsh on PowerShell fails with error: The parameter is incorrect

拟墨画扇 提交于 2019-12-01 17:54:41
I've been trying to run the following command on PowerShell: netsh http add sslcert ipport=0.0.0.0:443 certhash=<some certhash> appid={<random guid>} The problem is, it returns "The parameter is incorrect" every time. I've check the cert hash number, and the generated guid and they all alright. In fact, I ran the same command in cmd.exe and it worked perfectly, which adds to the frustration. I want to pass variables as the certhash and appid , which is why I'm using PowerShell. If anyone can help me understand why it isn't working or if there is something missing for it to work on PowerShell.

Command netsh using C#

家住魔仙堡 提交于 2019-12-01 13:58:38
I want to create a C# application to create a WLAN network. I currently use netsh using command prompt. My application should do this in button click. Here is the command I use in command prompt in admin mode "netsh wlan set hostednetwork mode=allow ssid=sha key=12345678" after that I enter "netsh wlan start hostednetwork". When I do this i can create a wifi local area network. In C# I coded like below private void button1_Click(object sender, EventArgs e) { Process p = new Process(); p.StartInfo.FileName = "netsh.exe"; p.StartInfo.Arguments = "wlan set hostednetwork mode=allow ssid=sha key

Got “The system cannot find the file specified” when I run NETSH from CreateProcess but it works ok on Command Prompt?

怎甘沉沦 提交于 2019-11-30 22:25:52
I have an NT service that calls a console program written in Delphi 7, let's call it failover.exe that in turn calls NETSH using a procedure I found: procedure ExecConsoleApp(CommandLine: ansistring; Output, Errors: TStringList); Note: ExecConsoleApp uses CreateProcess, see the following link for full code: http://www.delphisources.ru/pages/faq/base/createprocess_console.html I would pass the following to CommandLine before calling ExecConsoleApp : cmd.exe /c "C:\Windows\system32\netsh.exe interface delete address "Wireless Network Connection" 192.168.0.36" ExecConsoleApp will return an error: