Clear the Logs & History on Linux Systems to Delete All Traces You Were There [Tutorial]

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.พ. 2025
  • Get Our Premium Ethical Hacking Bundle (90% Off): nulb.app/cwlshop
    How to Wipe All Proof You Were in a Linux System
    Full Tutorial: nulb.app/x5osd
    Subscribe to Null Byte: goo.gl/J6wEnH
    Nick's Twitter: / nickgodshall
    Cyber Weapons Lab, Episode 216
    When somebody's computer is compromised, the hacker gains almost full control over that computer, allowing them to set up payloads such as reverse persistent shells or keystroke duplicators. However, when the hacker is setting up their payloads, they can leave behind traces that they were there. This evidence takes form in the Bash command history or the files they leave behind that were needed to set up the payload.
    If the hacker was smart, they would delete the command history and any files that are not necessarily to make the payload work. Doing so will decrease the chance that the
    hacker will get caught and will increase the chance that the payload is effective.
    In this episode of Cyber Weapons Lab, we'll be going over drd_'s article on Null Byte to see how a hacker would go about wiping their tracks. Knowing this will help you drill down to information the hacker may have missed during advanced digital forensics.
    To learn more, check out drd_'s full article on Null Byte: nulb.app/x5osd
    Follow Null Byte on:
    Twitter: / nullbyte
    Flipboard: flip.it/3.Gf_0
    Website: null-byte.com
    Vimeo: vimeo.com/chan...

ความคิดเห็น • 136

  • @diggacha
    @diggacha 3 ปีที่แล้ว +87

    Removing or zeroing out logs can be just as suspicious as leaving them in the firsr place and can trigger incident response measures. Alternatively, you can copy log files and directories on entry, perform minimal alterations to remove the copy commands, and then replace the log files with the copies when you're done. This can also all be easily scripted for entry and exit commands

    • @Murr808
      @Murr808 3 ปีที่แล้ว +3

      well said

    • @Confused_Cape_Goose
      @Confused_Cape_Goose 3 ปีที่แล้ว +2

      Thats actually really good advice. Thanks

    • @abbimilagon5499
      @abbimilagon5499 3 ปีที่แล้ว +1

      Very true

    • @MH-iz2xh
      @MH-iz2xh 3 ปีที่แล้ว +1

      Clever!!

    • @cybersavage1337
      @cybersavage1337 2 ปีที่แล้ว +2

      How exactly would you "replace" the log files in this scenario? I.e. what commands? Because if it's simply mv /copied_auth.log /current_auth.log I don't see how that doesn't trigger just as much of an IR.

  • @MartinsTalbergs
    @MartinsTalbergs 3 ปีที่แล้ว +60

    Suddenly all logs are lost from my server. Not suspicious at all..

    • @VidarrKerr
      @VidarrKerr 3 ปีที่แล้ว +5

      I know right.... Hilarious. This maybe works on someone's home "Lab", but nothing serious. Not to mention, they will certainly have many other machines/vms keeping records. This will work with small and maybe medium size businesses, especially businesses that are outside the financial industry --like retail, or real estate companies, etc.

    • @shawn8163
      @shawn8163 3 ปีที่แล้ว +4

      Most small medium-sized businesses do not have someone monitoring logs anyway

    • @RTMaster1
      @RTMaster1 3 ปีที่แล้ว +5

      Lets be honest, this Video is pretty basic anyway and the production quality is also pretty Bad this time

    • @CybernetiXS3C
      @CybernetiXS3C 3 ปีที่แล้ว

      Artillery, tripwire, sendmail, snort,.... This would have sent you IP addresses and changes with timestamp.

  • @circaaenjoyer
    @circaaenjoyer 3 ปีที่แล้ว +39

    so the whole video is about "sudo rm -r /var/log/*" ???

    • @ishaqahmed._
      @ishaqahmed._ 3 ปีที่แล้ว +3

      Watching this was quite a waste of time sadly

    • @rathinsaran6173
      @rathinsaran6173 3 ปีที่แล้ว

      Thanks

    • @CybernetiXS3C
      @CybernetiXS3C 3 ปีที่แล้ว

      😂

    • @weapoolx182
      @weapoolx182 ปีที่แล้ว +1

      The Best Linux Command is always this: *sudo rm -rf /** lol😂🧑‍💻

    • @ozomashi
      @ozomashi 7 หลายเดือนก่อน

      shred is better

  • @neutrosis
    @neutrosis 3 ปีที่แล้ว +36

    They missed out the most interesting part - how to get su :D

    • @jacesullivan4563
      @jacesullivan4563 3 ปีที่แล้ว +1

      You can find this on the nullbyte website

    • @madcapmagician6018
      @madcapmagician6018 3 ปีที่แล้ว +5

      at gun point.. you know like in the movies lol

  • @CulturalDifferences2.0
    @CulturalDifferences2.0 3 ปีที่แล้ว +2

    @Null Byte Thanks Nick for actually enlarging the text size in the shell. I wish this was done in all videos here.

  • @BilgeKarga1
    @BilgeKarga1 3 ปีที่แล้ว +17

    the most crucial step of pentest is also covering tracks glad you made a video about it

  • @_chris_6786
    @_chris_6786 ปีที่แล้ว +1

    If you wanna teach, you have to go slowly and paused, see what you write. Remember that you are guiding others.

  • @lefterispanos9543
    @lefterispanos9543 3 ปีที่แล้ว +6

    You guys are Great. I was wondering this morning how to clear the history,but I forgot about it. And now here it is. Thank you

    • @lefterispanos9543
      @lefterispanos9543 3 ปีที่แล้ว

      @@y4kuzi072 no I meant I forgot to get into it , as a reminder.

  • @CybernetiXS3C
    @CybernetiXS3C 3 ปีที่แล้ว +10

    This doesn't work if the system has something like tripwire using sendmail to forward changes within the system. Or even using artillery to log, and block entry ports to begin with. This is where the sysadmin would override the intelligence of the hacker.
    To master offensive security, one needs to master defensive security.

    • @Bilo_7
      @Bilo_7 ปีที่แล้ว

      Well said

  • @ricseeds4835
    @ricseeds4835 3 ปีที่แล้ว +9

    Did they just post the first take of this tutorial? He's trying to run commands as a user who's not in the sudoers file. At least post the second take where you've, hopefully, fixed the missteps if only to convince viewers that you understand what you're doing and not just following instructions left by someone else.

    • @SimpleHak
      @SimpleHak ปีที่แล้ว

      quite true. even in the truncate it doesn't show the parameter 0 on the cli and the cli throughs invalid number.

  • @2v2
    @2v2 8 หลายเดือนก่อน

    An alternative to rm -rf'ng a file, is using shred -xzuvf to overwrite the stored file with 0's and delete it securely.

  • @madcapmagician6018
    @madcapmagician6018 3 ปีที่แล้ว +3

    good info.. though it went a little fast. i noticed that went you deleted files the warning that the action would be reported always came up... is that not a log file itself that should be dealt with?

  • @thanoskoutr
    @thanoskoutr 3 ปีที่แล้ว +15

    Why is this even uploaded? It feels like this is a draft edit that is going to be edited in order to be uploaded. The sound is awful at some points and I feel like the presenter does not even know the basic Linux commands and permissions.
    For 2 minutes he is trying to delete the auth.log without explaining what he is doing wrong or what he finally did to delete it. Linux is kind enough to show to you that the user you are logged in (sandbox) is not a member of the sudo group, so he cannot execute commands as sudo, but you keep ignoring it.
    I mean its OK to not know what you are doing, but if you are going to make a video about it, I think you should be more careful.

    • @b1naryhero
      @b1naryhero 3 ปีที่แล้ว +6

      I know right? What's up with the dude failing at doing basic tasks and then not cutting that part out and just continue like nothing happened... I mean it was obviously edited and sped up? The only practical takeaway from this video was; "you can create hidden files in linux herpderp", "If you are root you can remove files that only root user has access to herpderp" and "Look at this cool script i downloaded and executed with no explaination of what it does". the script kiddie wibes are strong with this channel... and what's up with the other comments on this video, they all seem to praise it even though it was hella shoddy? Bought views/Click farm?

    • @VidarrKerr
      @VidarrKerr 3 ปีที่แล้ว +2

      This happens on this channel All The Time. They need to spend more time editing out all the F Ups.

    • @thanoskoutr
      @thanoskoutr 3 ปีที่แล้ว +2

      @@b1naryhero I totally agree with you. I didn't even mention the "Download this script to delete your traces" script kiddie part... I feel like the content here is leaning towards to edgy and catchy hacker titles that attract those who want content like "hoW to HaCk a FaCeBoOk acCouNt"

    • @TON-vz3pe
      @TON-vz3pe 3 ปีที่แล้ว +1

      Yes. For the whole length of this video I was thinking the same. I don't know if there is a dedicated person or a team who does the editing, or the same guy who casted the video did the editing. Maybe they did this in a hurry. Nullbyte is actually a pretty good channel, but why are they digging into topics like this I don't understand.

    • @RTMaster1
      @RTMaster1 3 ปีที่แล้ว

      Feels like the original content creators left the channel after TH-cam's decision to disallow actual explanations

  • @SALTINBANK
    @SALTINBANK 3 ปีที่แล้ว +7

    make a logic bomb that wipes the whole HDD after quitting session ...

    • @KarryKarryKarry
      @KarryKarryKarry 3 ปีที่แล้ว +1

      A logic bomb?
      How about some swirling graphics on all 7 monitors while you “Hack” the mainframe and solve crypto like a Rubrikscube 😂

    • @pranavr0y
      @pranavr0y 2 ปีที่แล้ว

      💀💀logic bomb

  • @pranaythammineni256
    @pranaythammineni256 3 ปีที่แล้ว +10

    Please make a video about clearing logs in windows!

    • @SALTINBANK
      @SALTINBANK 3 ปีที่แล้ว

      use privazer if you are a noob ...

    • @pranaythammineni256
      @pranaythammineni256 3 ปีที่แล้ว

      @@SALTINBANK and how do yiu clear logs as a pro?

  • @JonathanTucker1ls
    @JonathanTucker1ls 3 ปีที่แล้ว +2

    type a space before the command to stop it being recorded in history

    • @karlobabic8495
      @karlobabic8495 3 ปีที่แล้ว

      you mean like -a -t and not -a-t
      Or like
      -a
      -t
      ?

    • @JonathanTucker1ls
      @JonathanTucker1ls 3 ปีที่แล้ว

      @@karlobabic8495 ' ls' will not be recorded in history, where as 'ls' will

  • @jm252
    @jm252 3 ปีที่แล้ว +2

    Can you do one for windows or will flushdns be ok???

  • @atol71
    @atol71 3 ปีที่แล้ว

    How does the delete really really work? Is that air you breath?

  • @raulcattelan4506
    @raulcattelan4506 3 ปีที่แล้ว +1

    Thanks for the video

  • @thegripmaster666
    @thegripmaster666 3 ปีที่แล้ว +1

    Extremely basic info. I was expecting lot more depth. The only useful stuff was the covermyass git repo

  • @yashnagraj110
    @yashnagraj110 3 ปีที่แล้ว

    please upload a video about clearing logs on a windows computer through cmd

  • @フォグマシン
    @フォグマシン 3 ปีที่แล้ว +4

    the hardest part is finding a vulnerability allowing access into a machine

    • @VidarrKerr
      @VidarrKerr 3 ปีที่แล้ว

      It is called the secretary.

  • @harlemren5993
    @harlemren5993 3 ปีที่แล้ว

    That background music what is that???

  • @derylcovey7455
    @derylcovey7455 ปีที่แล้ว

    if someone wanted to hide all history they would start each command with a space...

  • @thelearner761
    @thelearner761 3 ปีที่แล้ว

    But i don't know where all these logs are get stored!!

  • @pichass9337
    @pichass9337 3 ปีที่แล้ว

    You work at the JPL?

  • @scientifictalkof
    @scientifictalkof 3 ปีที่แล้ว

    How to contact you?

  • @furryPigletto
    @furryPigletto 3 ปีที่แล้ว +1

    Good stuff but if i will have my hids system there i will know what was changed and will be alerted.

  • @realitynowassigned
    @realitynowassigned 3 ปีที่แล้ว +2

    Irregardless. So its regarded

  • @windwest720
    @windwest720 3 ปีที่แล้ว +4

    /dev/shm
    sandbox
    covermyass

  • @MuhammadLab
    @MuhammadLab 3 ปีที่แล้ว +2

    Awesome bro

  • @KINGABDUL99
    @KINGABDUL99 3 ปีที่แล้ว +1

    which app were you using to put all these commands

  • @taoriq3632
    @taoriq3632 3 ปีที่แล้ว +1

    Do you guys offer classes for beginners I am interested in cyber security and but I do not know any reputable sources that can be of help if you guys can help I would really appreciate it
    Thank you

    • @faizanarif2610
      @faizanarif2610 3 ปีที่แล้ว

      If you want to start In Hacking. Go for old Courses they are simple and easy to understand.

    • @taoriq3632
      @taoriq3632 3 ปีที่แล้ว

      @@faizanarif2610 Could you kindly refer any of these course to me perhaps a link or two
      thank you very much

    • @VidarrKerr
      @VidarrKerr 3 ปีที่แล้ว

      @@taoriq3632 Get books about basic computing and hardware. Once you fully understand hardware and firmware, the digital world is yours. I am not kidding.

    • @motif5775
      @motif5775 3 ปีที่แล้ว

      @@VidarrKerr Thank you. Any recommendations?

  • @HIDDENACHE
    @HIDDENACHE 3 ปีที่แล้ว +2

    you scared me

  • @joeycavazos6746
    @joeycavazos6746 3 ปีที่แล้ว

    Who’s Ron k ? Delete if not allowed

  • @Shortcircuithobbyshop
    @Shortcircuithobbyshop 3 ปีที่แล้ว

    long time no see. where are you cute hacker ??

  • @saisandeepgurram8889
    @saisandeepgurram8889 3 ปีที่แล้ว +1

    Sir, why do you tell about firewall and can you show how to create the firewall for android and windows and Mac .Can you help me to create own firewall to defend from the hackers.can you please make a video on it.

  • @iZ3r0x9
    @iZ3r0x9 9 หลายเดือนก่อน

    This whole video is a fail, 'deleting' logs is very bad practice. And you're actually not deleting anything with rm. The data is still there until overwritten and any forensic tool will recover the files very easily.

  • @AriannaEuryaleMusic
    @AriannaEuryaleMusic 3 ปีที่แล้ว +1

    Easier, just do all your hacks on a LIVE Persistent USB system, and when you finish your hacks,
    and (if sensitive) just destroy it...

  • @temudjin1155
    @temudjin1155 3 ปีที่แล้ว

    very nice

  • @aidanguant7984
    @aidanguant7984 3 ปีที่แล้ว

    I love this stuff. Definitely one of the most comprehensive hacking channels on yt

  • @oceanic2132
    @oceanic2132 3 ปีที่แล้ว

    Does it work in windows 10? If so do i just use command prompt or no

  • @4n0nmann5
    @4n0nmann5 3 ปีที่แล้ว +5

    Please make one for windows :)

  • @Hextrill
    @Hextrill 3 ปีที่แล้ว

    This video has virtually no useful instruction in it, anyone with basic command line knowledge wouldn't have to try things 50 times and still miss any useful lesson.

  • @nehana649
    @nehana649 3 ปีที่แล้ว +4

    Can you please make a Discord server

    • @Null-si2fy
      @Null-si2fy 3 ปีที่แล้ว

      Yeah bro

    • @nehana649
      @nehana649 3 ปีที่แล้ว

      @@Null-si2fy Will you make an announcement when it’s done? Also, when do u expect it to be done?

    • @Null-si2fy
      @Null-si2fy 3 ปีที่แล้ว

      @@nehana649 gimme till Monday

    • @nehana649
      @nehana649 3 ปีที่แล้ว +1

      @@Null-si2fy No pressure man. Keep up the great work!

    • @RTMaster1
      @RTMaster1 3 ปีที่แล้ว

      @@nehana649 thats not the uploader, someone tries to trick you

  • @chanelle2819
    @chanelle2819 3 ปีที่แล้ว

    Does this work on chromebook?

  • @widiudb3313
    @widiudb3313 ปีที่แล้ว

    I see that you had alot of acnes. Consider to stop consuming oily food bro. It will help.

  • @Hunter-x3b
    @Hunter-x3b ปีที่แล้ว

    You know how to see keyboard typing history in kali?

  • @Recon_Racing
    @Recon_Racing 3 ปีที่แล้ว

    You guys aren't considering a SIEM proxy

    • @devilhell3044
      @devilhell3044 3 ปีที่แล้ว

      @@y4kuzi072 hi are you expert in hacking??
      I want to learn hacking and build my career in cyber security
      Can you tell me what's the minimum knowledge I should know before starting learning hacking(sorry i am not good at English)

  • @aspiringpentester9347
    @aspiringpentester9347 3 ปีที่แล้ว

    video is good yess yess
    but can this be elaborated for beginners that are kinda new know maybe not as much as you but a little about penetesting that they can get around the system without a problem?

  • @androidboie64
    @androidboie64 3 ปีที่แล้ว

    Hi sir can U make a small video on How to instal airgeddon with all tools on Ubuntu.
    I am getting much difficulty and errors and there is no Video about it instead the video is how we can install on Kali but i want to install it on ubuntu

  • @zzing549
    @zzing549 3 ปีที่แล้ว

    Super amazing

  • @ugli1440
    @ugli1440 3 ปีที่แล้ว +3

    Instead of deleting the Auth Logs to cover your tracks, why don't you just break the OS by deleting all the directories? I mean if we're talking about a situation where you *need* to cover your tracks then surely it's just safer to delete these logs and then destroy the the system. lol
    Here is the command you would use:
    rm -rf / (this one deletes everything)

  • @arwa7sh953
    @arwa7sh953 3 ปีที่แล้ว +1

    i have cueshn for yuo can yuo hak pobg mobile?😢😢

  • @ereal2
    @ereal2 3 ปีที่แล้ว

    this video is all over the place , what?!..

  • @MrBole1968
    @MrBole1968 ปีที่แล้ว

    Respect!👍

  • @jazzochannel
    @jazzochannel 3 ปีที่แล้ว

    pwnmagad l33t haxxr0 .kn0ws-hidden-philez

  • @besthayallappa5017
    @besthayallappa5017 3 ปีที่แล้ว

    Hi Brother
    I am a software engineer. Looking for a fast processing laptop. I will be using VMs along with physical system same time. Please suggest one.

  • @Iomiami
    @Iomiami 3 ปีที่แล้ว +1

    🤔

  • @LinuxJedi
    @LinuxJedi 3 ปีที่แล้ว +1

    super user is easy,
    sudo passwd
    "enter new password"

  • @jonathanmcdonald7512
    @jonathanmcdonald7512 3 ปีที่แล้ว +2

    Bro, bro bro. Bro bro bro. Bro. Bro.

  • @peterpan9988
    @peterpan9988 3 ปีที่แล้ว

    Stupid background music.

  • @blackdragon9550
    @blackdragon9550 3 ปีที่แล้ว

    Hey I want to learn how to hack online games can you please make one video on it

  • @realhomy
    @realhomy 3 ปีที่แล้ว +1

    Yessir

  • @TheMax0005
    @TheMax0005 3 ปีที่แล้ว +1

    Dude...go take care of your skin

  • @zod.doctorop
    @zod.doctorop 3 ปีที่แล้ว +1

    Helli bro

  • @gaius6187
    @gaius6187 3 ปีที่แล้ว

    𝙏𝙝𝙚 𝙐𝙡𝙩𝙞𝙢𝙖𝙩𝙚 𝙒𝙖𝙮 𝙏𝙤 𝘾𝙡𝙚𝙖𝙧 𝙔𝙤𝙪𝙧 𝘽𝙧𝙤𝙬𝙨𝙚𝙧 𝙃𝙞𝙨𝙩𝙤𝙧𝙮

  • @anmolrai7376
    @anmolrai7376 3 ปีที่แล้ว

    first

  • @zod.doctorop
    @zod.doctorop 3 ปีที่แล้ว +1

    Bro how to hack target fb account plz bro

    • @alexandermertens7615
      @alexandermertens7615 3 ปีที่แล้ว +10

      Lmao get a life

    • @trustyaxe
      @trustyaxe 3 ปีที่แล้ว +6

      @@alexandermertens7615 I am suspicious of the mental health of those seeking to hack social media accounts. Very sad...

    • @trustyaxe
      @trustyaxe 3 ปีที่แล้ว

      @killer boy lol

    • @VidarrKerr
      @VidarrKerr 3 ปีที่แล้ว +5

      @killer boy Will probably work if done the right way. And YES, people looking to hack into other peoples' social media are complete losers. Probably been cucked over by their girlfriends/boyfriends and have no life.

    • @the___dude
      @the___dude 3 ปีที่แล้ว

      Bro stfu bro