Live data from Hacker News

The Magic of strace

chadfowler.com

1–10 of 105 posts

Re: The Magic of strace

#2
Don't forget it's userspace equiv (strace is syscalls), ltrace. This tracks all lib calls made by process.

Under windows, strace is an SSL/TLS monitoring tool (also hella useful). It shows payloads passed to CryptoAPI/CNG libs so you can easily troubleshoot explicitly encrypted protocols like ldaps. Especially useful if you use client authenticated TLS where is is not possible to use a TLS mitm proxy to snoop the layer 7 data.

Re: The Magic of strace

#3

Don't forget it's userspace equiv (strace is syscalls), ltrace. This tracks all lib calls made by process. Under windows, strace is an SSL/TLS monitoring tool (also hella useful). It shows payloads passed to CryptoAPI/CNG libs so you can easily troubleshoot explicitly encrypted protocols like ldaps. Especially useful if you use client authenticated TLS where is is not possible to use a TLS mitm proxy to snoop the lay…

Good call on ltrace. I thought about writing about that one next.

Re: The Magic of strace

#4
Small, somewhat nit-picky critique: the man pages for system calls are in section 2. If you want to see the docs for the "read()" syscall, and not the bash builtin "read", saying "man read" w̶o̶n̶'̶t̶ may not (see follow-up) do what you expect. Instead, you should say

  man 2 read
This should probably be mentioned somewhere.

Otherwise, great writeup. Thanks for sharing!

(edited)

Re: The Magic of strace

#6
Please see

ftp://86.0.252.89/pub/release/website/tools/trace-20140126-x86_64-b95.tar.gz

This is a tool called ptrace - which does everything that strace does and a lot more. You have working binaries in there, and most of the source - I havent extricated the full build dependencies so it all builds, but this includes extra facilities like reporting summaries of process trees, showing only connections or files, and shlib injection into a target process.

If people are interested more on this, contact me at CrispEditor-a.t-gmail.c-o-m

Re: The Magic of strace

#7
Strace is easy to use, commonly available, and very useful in many situations.

More modern tools such as dtrace for the solaris and systemtap for linux addresses similar problems but with a broader coverage.

Re: The Magic of strace

#10

Please see ftp://86.0.252.89/pub/release/website/tools/trace-20140126-x86_64-b95.tar.gz This is a tool called ptrace - which does everything that strace does and a lot more. You have working binaries in there, and most of the source - I havent extricated the full build dependencies so it all builds, but this includes extra facilities like reporting summaries of process trees, showing only connections or files, and sh…

I am a bit paranoid about downloading a binary from a site without a domain name.
Post reply on HN