telnet

Wireshark嗅探抓取telnet明文账户密码

北城余情 提交于 2019-12-04 09:23:54
0x00 Wireshark(前称Ethereal)是一个 网络封包 分析软件。网络封包分析软件的功能是撷取网络封包,并尽可能显示出最为详细的网络封包资料。Wireshark使用WinPCAP作为接口,直接与网卡进行数据报文交换。 我们可以利用arpspoof拦截转发同一网段下其他用户流量,再使用Wireshark来分析查看流量 配置环境: 攻击端:kali 靶机端:2003 xp 0x01 首先确保三台机在同一网段下 kali IP为192.168.1.3 XP IP为192.168.1.2 2003 IP为192.168.1.1 kali开启流量转发 cat /proc/sys/net/ipv4/ip_forward 查看浏览转发,如果是0就是没有开启,1是开启 0 可以看到没有开启 echo 1 > /proc/sys/net/ipv4/ip_forward 修改为1 这是时候我们的流量转发就能开启,别人的流量经过我这里也能转发出去 接下来就是嗅探转发获取流量了 这里用到arpspoof来转发流量 arpspoof -i (自己网卡) -t 目标IP 网关 打开Wireshark点开自己arpspoof配置的网卡 xp通过telnet连接2003 回到Wireshark开始过滤 过滤规则 ip.addr==目标IP && tcp.port==23

Multiple simultaneous network connections - Telnet server, Python

非 Y 不嫁゛ 提交于 2019-12-04 09:05:06
问题 I'm currently writing a telnet server in Python. It's a content server. People would connect to the server via telnet, and be presented with text-only content. My problem is that the server would obviously need to support more than one simultaneous connection. The current implementation I have now supports only one. This is the basic, proof-of-concept server I began with (while the program has changed greatly over time, the basic telnet framework hasn't): import socket, os class Server: def _

Redhat 6.7 x64升级SSH到OpenSSH_7.4p1文档

让人想犯罪 __ 提交于 2019-12-04 07:03:03
导语 Redhat企业级系统的6.7版自带SSH版本为OpenSSH_5.3p1, 基于审计和安全性需求,建议将其升级到最新的OpenSSH版本,当前官网最新版本为7.4p1. 本文档将详细介绍OpenSSH升级的完整步骤。需要说明的是,升级过程中虽然涉及zlib、openssl和openssh的卸载,但是并不会导致当前的ssh远程连接会话断开,因此是可以将整个升级过程写成自动化脚本以进行自动批量部署的。 步骤 1、准备工作 1.1、下载相关软件包 OpenSSH需要依赖zlib和OpenSSL,因此需要从官网下载三者的源码包。需要注意的是:OpenSSH最新版7.4p1依赖的OpenSSL版本为1.0.2k,而不是其最新版1.1.0e(使用此版会升级失败),ZLIB可以使用最新版1.2.11。redhat6.7自带的zlib版本为1.2.3,也可不进行升级。 三者源码下载地址: http://www.zlib.net/ http://www.openssl.org/ http://www.openssh.org/ 1.2、查看系统当前软件版本 # rpm -q zlib # openssl version # ssh -V 1.3、配置本地yum源 因安装相关工具和编译源码需要先安装部分软件包,因此需要先配置好本地yum源(如有远程yum源更好),配置方法如下: A

modify a datastream on the fly

我是研究僧i 提交于 2019-12-04 06:20:11
问题 This question was migrated from Server Fault because it can be answered on Stack Overflow. Migrated 9 years ago . I need to hijack and modify a datastream. The stream consists of fixed-width commands. Each command is a new line, and the documentation says that each command starts and ends with an STX / ETX pair (start and end of text) The sending system is using serial, but is attacked to an iPocket device that communicates over IP to our PBX. From what I can tell it's just converting the

C# - Socket to log on to Firewall

。_饼干妹妹 提交于 2019-12-04 05:04:21
问题 I wrote an app to automatically connect to our different Firewalls. All of them work with the same frontend. We telnet to the IP and they give the message LOGIN or LOGOUT and ask for a username or password. I used this code: public static void ConnectToFirewall(string strUsername, string strPassword, string strFirewallIp) { IPAddress[] ipaIpAddressCollection = Dns.GetHostAddresses(strFirewallIp); IPEndPoint ipeIpEndPoint = new IPEndPoint(ipaIpAddressCollection[0], intPort); Socket sckSocket =

Troubleshooting(三):网络

核能气质少年 提交于 2019-12-04 04:16:58
前言 在 Troubleshooting 过程中,检查完进程信息后,接下来就是排查网络情况的时候了,初略翻过《TCP/IP 详解卷一:协议》这本书,简直跟看《深入理解 Linux 内核》一毛一样,各种协议各种底层结构体,每个域代表不同的意思,许许多多的域组合在一起共同控制着网络和内核。 Troubleshooting 系列仅仅整理工具和排查问题可能用到的命令,尽量不细述底层概念(功力有限我也写不出来)。 curl netstat iptables network ifconfig ip地址配置 traceroute telnet ping lsof iftop(top系列)vpn tcpdump 等抓包,和各种网络攻击(后续单独整理) 网络状态 netstat 显示网络相关信息(网络连接、路由表、接口状态等) 常见的参数: -a 显示所有连接中的 socket -c 持续列出网络状态 -n 尽量把别名转换成数字显示 -o 显示计时器 -p 显示正在使用 socket 的程序识别码和程序名称 -i 显示网卡列表 -s 显示网络统计信息 -v 显示指令执行过程,与 -p 不可同用 -t/u tcp/udp 连接状况 netstat 的输出结果可分为两个部分: 1、Active Internet connections:有源 TCP 连接,列中 Recv-Q 和 Send-Q

Python multiple telnet sessions

浪子不回头ぞ 提交于 2019-12-04 04:15:35
问题 I need to build a script to get the telnet output of as many hosts as possible and save them to a separate file for each host. The script should run as a daemon. For the moment i have a function that encapsulates the logic for do it for a single host with telnetlib , but i do not how to proceed. I planned to open a process ( multiprocessing.Process ) for each host but i suspect it's going to be a resource waste and it must to exist a better way :) def TelnetLogSaver(hostname,ip,filename): #

通过telnet连接,ssh转发

只谈情不闲聊 提交于 2019-12-04 03:38:24
SSH端口转发 SSH 会自动加密和解密所有 SSH 客户端与服务端之间的网络数据。但是,SSH 还能够将其他 TCP 端口的网络数据通过 SSH 链接来转发,并且自动提供了相应的加密及解密服务。这一过程也被叫做“隧道”(tunneling),这是因为 SSH 为其他 TCP 链接提供了一个安全的通道来进行传输而得名。例如,Telnet,SMTP,LDAP 这些 TCP 应用均能够从中得益,避免了用户名,密码以及隐私信息的明文传输。而与此同时,如果工作环境中的防火墙限制了一些网络端口的使用,但是允许 SSH 的连接,也能够通过将 TCP 端口转发来使用 SSH 进行通讯 SSH 端口转发能够提供两大功能: 加密 SSH Client 端至 SSH Server 端之间的通讯数据 突破防火墙的限制完成一些之前无法建立的 TCP 连接 1.目标 原机器 通过一台中间机器连接另一台机器 机器A需要连接到机器C,但是机器C拒绝A的连接,此时,机器A通过机器B取连接机器C。 机器A本机打开的端口 192.168.39.3 A 192.168.39.7 B 192.168.39.8 C 2.环境三台Centos 虚拟器 机器A,C为CentOS8 机器B为CentOS7 A机器需要安装telnet客户端 yum install -y telnet C机器需要安装telnet服务端 yum

设计模式-----依赖倒置原则

陌路散爱 提交于 2019-12-04 02:09:42
一、原理介绍 1、官方定义 依赖倒置原则,英文缩写 DIP ,全称Dependence Inversion Principle。 原始定义:High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions。 官方翻译:高层模块不应该依赖低层模块,两者都应该依赖其抽象;抽象不应该依赖细节,细节应该依赖抽象。 2、自己理解 2.1、原理解释 上面的定义不难理解,主要包含两次意思: 1)高层模块不应该直接依赖于底层模块的具体实现,而应该依赖于底层的抽象。换言之,模块间的依赖是通过抽象发生,实现类之间不发生直接的依赖关系,其依赖关系是通过接口或抽象类产生的。 2)接口和抽象类不应该依赖于实现类,而实现类依赖接口或抽象类。这一点其实不用多说,很好理解,“面向接口编程”思想正是这点的最好体现。 2.2、被“倒置”的依赖 相比传统的软件设计架构,比如我们常说的经典的三层架构,UI层依赖于BLL层,BLL层依赖于DAL层。由于每一层都是依赖于下层的实现,这样当某一层的结构发生变化时

Error no module named curses

我的梦境 提交于 2019-12-04 01:16:28
When I try to run the following code... from telnetsrvlib import * if __name__ == '__main__': "Testing - Accept a single connection" class TNS(SocketServer.TCPServer): allow_reuse_address = True class TNH(TelnetHandler): def cmdECHO(self, params): """ [<arg> ...] Echo parameters Echo command line parameters back to user, one per line. """ self.writeline("Parameters:") for item in params: self.writeline("\t%s" % item) def cmdTIME(self, params): """ Print Time Added by dilbert """ self.writeline(time.ctime()) logging.getLogger('').setLevel(logging.DEBUG) tns = TNS(("0.0.0.0", 8023), TNH) tns