Using Strace to Trace Linux Syscalls

Sdílet
Vložit
  • čas přidán 8. 08. 2024
  • In this video, we use the Linux strace command to trace Linux system calls. We practice filtering and reading the output to see the full behavior of programs.
    ---
    Timestamps:
    00:00 Intro
    00:50 Strace Man Page
    01:55 Example C program
    03:44 Strace Syscalls Output
    05:44 A Warning about Malware
    07:10 Filtering Output
    09:30 Excluding System Calls
    10:30 Counting System Calls
    11:40 Child Processes
    12:42 Following Forks
    15:31 Recap
    ---
    Links Mentioned in Video:
    Strace Man Page:
    man7.org/linux/man-pages/man1...
    ---
    laurieWIRED Twitter:
    / lauriewired
    laurieWIRED Website:
    lauriewired.com
    laurieWIRED Github:
    github.com/LaurieWired
    laurieWIRED HN:
    news.ycombinator.com/user?id=...
    laurieWIRED Reddit:
    / lauriewired
  • Věda a technologie

Komentáře • 43

  • @exalted1ne
    @exalted1ne Před rokem +22

    When I was younger, I had an interest in reversing and stumbled across Lena's Reversing tutorials... I couldn't quite grasp it back then but I now have a renewed interest. The amount of effort and clarity you put in these videos is amazing. Thank you.

  • @liamwhalen
    @liamwhalen Před 6 měsíci +1

    I really like the presentation in these tutorials. It's like you are communicating to us from your secret bunker base--letting the people know how to use the systems that were built for them. I've used strace a bit, and your explanation will make my future use of it even better.

  • @joojay328
    @joojay328 Před 4 měsíci +1

    I LOVE this tutorial and presentation. very adhd friendly and adorable. Thank you for taking the time on this video. There are people that appreciate the work you've done. :)

  • @goat5480
    @goat5480 Před rokem +5

    First time i see your channel, love the style and lain inspiration, you got yourself a new subscriber here 💪

  • @dream0283
    @dream0283 Před rokem

    I just started learning about it yesterday and surprisingly, you released this video today. 😂

  • @labeqfci9556
    @labeqfci9556 Před rokem +7

    The fact that you don't edit out the "errors" you make on the console while recording makes the video flows perfectly because it feels more real and like a dynamic study session instead of a pre-recorded unreal stuff. Thanks for talking about such very specific subjects.

  • @NTxC
    @NTxC Před rokem +21

    I'm a RE and malware analysis junkie. About 10 years ago I set up a virtual machine with Windows XP on it, downloaded dozens of gigabytes of malware, set up file + registry + network monitors and just randomly executed malware in the VM. It was a lot of fun. One of the malware samples was a keylogger which stored my keystrokes, and sent it over plain FTP to a server in Nigeria. Through Fiddler I discovered that the username and password for that FTP server was in plain text, so I tried logging in to that server and it worked. Before my eyes, on the FTP server, there were hundreds of folders, each filled with data harvested from victims of the malware. The data included also tons of banking and credit card information. I was able to discover the identity of the man running the Nigerian server and managed to find him on social media. Pretty crazy. Another malware sample I tested launched a little chat window in the middle of the screen and the chatbox literally had the title "You're Now Speaking With Mr. Hacker!"... and the person running the malware backend was typing to me, boasting about how I got haxx0red. I played along and begged him not to do any harm to my computer and he was just laughing in my face. Then I told him it's a virtual machine... and reverted to a clean snapshot. When it comes to reverse engineering, I use IDA Pro and Ghidra to discover how exactly some of my favorite older games work under the hood. Mostly Sega Genesis/Atari ST (Motorola 68000) but also x86. In one case I got in the mood to remake an 1988 game I was reversing, in C/C++, to achieve its compatibility with modern systems and fix some of the gameplay bugs. You can see some of the results of that on my channel :)

  • @NTxC
    @NTxC Před rokem

    Forgot to mention your videos are a great introduction to mobile malware analysis for someone like me, coming from workstation malware analysis, so thank you for them. That damn Fishy tune though lol, I can't get rid of it from my head

  • @CDizzzle4Rizzle
    @CDizzzle4Rizzle Před 10 měsíci

    Thx for the great videos! Running strace on nmap to see how things are working under the hood. Maybe ill get to reversing some malware sometime.

  • @johnpapa8554
    @johnpapa8554 Před 4 měsíci +1

    Beautiful and smart.. love your videos.

  • @AliceyBob
    @AliceyBob Před 8 měsíci

    Amazing video. Very very usefull !!!

  • @miss_tech
    @miss_tech Před rokem +1

    I love your conentent 🎉

  • @andyhusheng
    @andyhusheng Před 14 dny

    It's a nice voice. I like it😀

  • @Pixalynx
    @Pixalynx Před rokem +2

    could you make a video on how you make your videos, I want to know how you make the overlays for copland OS etc

  • @OPlutarch
    @OPlutarch Před rokem

    Love it, thank you very much! Can you make the future videos with more zoom on the terminal? Please :)

    • @lauriewired
      @lauriewired  Před rokem +1

      Sure thing, future videos are now using a larger font :)

  • @H0LAI
    @H0LAI Před rokem

    I find the system call code extremely interesting from a signal path perspective. I got recommended sysinternals by GPT4 for psexec to get a peek inside the kernel. I'm curious if anything in sysinternals or syscalls can do this signal path analysis for AI behaviour, just as deep.
    Thanks for the video Laurie.

  • @roccoranallo4027
    @roccoranallo4027 Před rokem +1

    Great video Laurie, can you do one on GDB?

    • @lauriewired
      @lauriewired  Před rokem +1

      Great suggestion! It's on my list of one to do soon

  • @mateuspaimdebarros6959
    @mateuspaimdebarros6959 Před 4 měsíci

    Você é a programadora mais linda que eu já vi

  • @gert9537
    @gert9537 Před rokem +2

    Could you make a video on ltrace :)

  • @illegalsmirf
    @illegalsmirf Před 5 měsíci +1

    she's such adorbs 🥹

  • @aakarshanraj1176
    @aakarshanraj1176 Před dnem

    great video, but there are some mistakes, there is pread64 in command at 10:21 so the command didn't worked as intended.

  • @ssuuy
    @ssuuy Před rokem +2

    yeah but there is still pread64

  • @microscorpi0n
    @microscorpi0n Před rokem

    Why do you suppose the order of parent/child output is different after executing fork_example with the -f flag versus without?
    Is the timing of parent/child process execution indeterminate?

    • @lauriewired
      @lauriewired  Před rokem +1

      It's actually just happenstance what gets printed first since calling fork creates a new process that executes at the same time. You could even get these printed in a different order each time you run

  • @AliceyBob
    @AliceyBob Před 8 měsíci

    The desktop image with TUX. Please, share it !!

  • @DominikZalewski85
    @DominikZalewski85 Před 11 měsíci +1

    Nicely explained and I like the style :) Sub from me

  • @levonschaftin3676
    @levonschaftin3676 Před rokem +7

    i love you

  • @Omar-sr1ln
    @Omar-sr1ln Před 7 měsíci +1

    wanna be tracer ? 🎵🎵

  • @StupidusMaximusTheFirst
    @StupidusMaximusTheFirst Před 9 měsíci

    I need to run an strace to detect the last time I needed to run strace. I wish you well, and I hope you never stop, but just remember that there might be a day when it's gonna be the last time you will ever run strace. You won't realize it, but you will never use strace ever again after that day. Sad...

  • @hassanalbolkiah127
    @hassanalbolkiah127 Před rokem +2

    What do you think of /g/ and Sneed?

    • @me_12-vw1vi
      @me_12-vw1vi Před rokem +1

      my wife Laurie thinks fondly of /g/ - gentlemen and Sneed is an important historical figure

  • @theshadypersonify
    @theshadypersonify Před 3 měsíci +1

    I clicked for the Thumbnail and I was mislead. >:(

  • @InfernoPetrivich-mk5ft

    @LaurieWired , are u maried?) You sooo cute