主要是通過(guò)bat操作防火墻添加規(guī)則,一般是tcp與udp。
日前,全球近百個(gè)國(guó)家和地區(qū)都有電腦系統(tǒng)遭受一個(gè)名為WannaCry的病毒攻擊,被攻擊者被要求支付比特幣才能解鎖。12日,安全軟件制造商Avast表示,它已經(jīng)在99個(gè)國(guó)家觀察到超過(guò)57000個(gè)感染例子。
13日,中國(guó)國(guó)家互聯(lián)網(wǎng)應(yīng)急中心發(fā)文稱,互聯(lián)網(wǎng)上出現(xiàn)針對(duì)Windows操作系統(tǒng)的勒索軟件的攻擊案例,勒索軟件利用此前披露的Windows SMB服務(wù)漏洞(對(duì)應(yīng)微軟漏洞公告:MS17-010)攻擊手段,向終端用戶進(jìn)行滲透?jìng)鞑ィ⑾蛴脩衾账鞅忍貛呕蚱渌麅r(jià)值物。
從5月12日晚間起,中國(guó)多個(gè)高校的師生陸續(xù)發(fā)現(xiàn)自己電腦中的文件和程序無(wú)法打開(kāi),而是彈出對(duì)話框要求支付比特幣等贖金后才能恢復(fù)。
方法
請(qǐng)將以下代碼存為 關(guān)閉端口.bat ,以管理員身份運(yùn)行就可以了,運(yùn)行前記得打開(kāi)防火墻雙擊使用。
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)exit @echo off color 1f title 關(guān)閉135 137 138 139 445 端口 echo. echo. echo. echo 正在關(guān)閉135端口 請(qǐng)稍候… netsh advfirewall firewall add rule name = "Disable port 135 - TCP" dir = in action = block protocol = TCP localport = 135 echo. netsh advfirewall firewall add rule name = "Disable port 135 - UDP" dir = in action = block protocol = UDP localport = 135 echo. echo 正在關(guān)閉137端口 請(qǐng)稍候… netsh advfirewall firewall add rule name = "Disable port 137 - TCP" dir = in action = block protocol = TCP localport = 137 echo. netsh advfirewall firewall add rule name = "Disable port 137 - UDP" dir = in action = block protocol = UDP localport = 137 echo. echo 正在關(guān)閉138端口 請(qǐng)稍候… netsh advfirewall firewall add rule name = "Disable port 138 - TCP" dir = in action = block protocol = TCP localport = 138 echo. netsh advfirewall firewall add rule name = "Disable port 138 - UDP" dir = in action = block protocol = UDP localport = 138 echo. echo 正在關(guān)閉139端口 請(qǐng)稍候… netsh advfirewall firewall add rule name = "Disable port 139 - TCP" dir = in action = block protocol = TCP localport = 139 echo. netsh advfirewall firewall add rule name = "Disable port 139 - UDP" dir = in action = block protocol = UDP localport = 139 echo. echo 正在關(guān)閉445端口 請(qǐng)稍候… netsh advfirewall firewall add rule name = "Disable port 445 - TCP" dir = in action = block protocol = TCP localport = 445 echo. netsh advfirewall firewall add rule name = "Disable port 445 - UDP" dir = in action = block protocol = UDP localport = 445 echo. echo 按任意鍵退出 pause>nul
注意事項(xiàng)
關(guān)閉端口只是降低電腦中毒的幾率,如果要完全防止病毒入侵,還是要安裝系統(tǒng)補(bǔ)丁,修復(fù)系統(tǒng)漏洞
防止該病毒入侵電腦方法:1.關(guān)閉445等端口,關(guān)閉網(wǎng)絡(luò)共享;2.安裝系統(tǒng)補(bǔ)丁或系統(tǒng)進(jìn)行更新,修復(fù)系統(tǒng)漏洞。
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)exit
很多朋友對(duì)第一句話不太熟悉,其實(shí)這個(gè)就是以 管理員權(quán)限啟動(dòng)應(yīng)用程序
標(biāo)簽:昌都 通遼 韶關(guān) 阿里 海北 咸寧 資陽(yáng) 滄州
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《通過(guò)批處理關(guān)閉135 137 445等端口的實(shí)現(xiàn)代碼(勒索病毒)》,本文關(guān)鍵詞 通過(guò),批處理,關(guān)閉,135,137,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。