V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
rayn32
V2EX  ›  Linux

请教 /root/目录下自己出现奇怪数字文件

  •  
  •   rayn32 · 2023-02-09 17:17:52 +08:00 · 2049 次点击
    这是一个创建于 440 天前的主题,其中的信息可能已经有所发展或是发生改变。

    服务器下自己出现的奇怪数字文件 全部空的,也不知道哪个程序创建的 特来请教,有知道或者怎么查找的的说一说呗

    root@node-1 ~ # ls
    72830066  72879309  72892302  72921932  72930730  72952308  73103485  go
    
    -rw-r--r--  1 root root    0 Feb  3 09:58 25343934
    -rw-r--r--  1 root root    0 Feb  6 10:31 25429538
    -rw-r--r--  1 root root    0 Feb  6 11:06 25430235
    -rw-r--r--  1 root root    0 Feb  7 00:15 25445814
    -rw-r--r--  1 root root    0 Feb  7 01:04 25446781
    
    7 条回复    2023-02-23 09:19:31 +08:00
    okakuyang
        1
    okakuyang  
       2023-02-09 17:24:47 +08:00
    被黑了
    string2020
        2
    string2020  
       2023-02-09 17:25:28 +08:00
    一个个进程排除没啥其他办法
    libook
        3
    libook  
       2023-02-09 17:33:24 +08:00
    看起来像每个小时自动执行,你可以看看 corntab 或者 systemd 的 timer 。
    lookStupiToForce
        4
    lookStupiToForce  
       2023-02-09 18:08:56 +08:00   ❤️ 1
    you can try searching it in English and you will get:

    serverfault[.]com/questions/320716/find-out-which-process-is-changing-a-file
    Tink
        5
    Tink  
       2023-02-09 18:43:53 +08:00 via Android
    cron
    feedcode
        6
    feedcode  
       2023-02-09 19:48:48 +08:00   ❤️ 6
    首先确保 auditd 已经安装并且启动,然后加一条 audit 规则

    ```
    auditctl -w /root -p w -k monitor_root_dir
    ```

    日志会写到 /var/log/audit/audit.log 或者 /var/log/audit.log , 里面有 uid, gid, pid
    cmingxu
        7
    cmingxu  
       2023-02-23 09:19:31 +08:00
    打开 trace event , 定位下 open 系统调用
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1022 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 22:01 · PVG 06:01 · LAX 15:01 · JFK 18:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.