# DUT後門指令 ### 登入後門方式 用Tera term 寫一個file.ttl,之後就可以匯入以下指令就可以進入後台,手動敲也OK ```bash= sendln '' Username = 'snyest' Password = '36e7965737' timout=3 sendln Password sendln 'config t' sendln Username waitln 'Insufficient privilege level.' 'CLI console locked' 'Insufficient privilege level' sendln Username wait 'Enter Password to unlock the console:' sendln Password sendln 'su' wait 'Password:' sendln 'moxa' ``` #### 從tftp server 傳檔案給DUT ```bash= tftp -g -r <filename> <tftp_ip> ``` ### 查看Arp table 數量 ```bash= ip neigh | wc -l ``` ### 查看Arp table ```bash= ip neigh ``` ### 啟動該程式 ```bash= python3 <filename> python3 ip_range_ping.py ``` ### 讓DUT從後台往外Ping 進到後門後,先匯入下面這串檔案 請先將下面這個code存成一個py檔,之後用上面的tftp指令把他傳進去DUT,接著使用 **python 3 <file nmae>** 就可以執ping 如想調整Ping的range,可修改,可參考此連結 [參考連結](https://docs.python.org/3/library/ipaddress.html#ipaddress.summarize_address_range) ```bash= import ipaddress import asyncio async def run(cmd): p = await asyncio.create_subprocess_shell(cmd) async def main(): tasks = [] for ip in ipaddress.IPv4Network('192.168.0.0/20): tasks.append(run('ping -c 1 -W 1 '+ str(ip))) await asyncio.wait(tasks) loop = asyncio.get_event_loop() loop.run_until_complete(main()) loop.close() ``` ### 觀察Mac table ```bash= cat /moxa/storage/macTable.json ``` **更新mac table** ```bash= spt_config_reg -q ``` ### 觀察CPU proccess rate ```bash= export TERM=xterm top -H -d 1 之後按下大寫P他會依照Loading高到低排序 ```