Hacker's Mindset

Bharatvaj Hemanth

September 9, 2022

NOTE: This article is hopeless, come back later.

A person in hacker's mindset is not afraid to split up a complex package and see what's inside.

An hacker sees the the terminal as the green lantern's ring. You can manifest anything you imagine.

When you are out in the field, you are vulnerable to everything. Having tools that are stable and reliable is very important. Reliability comes only from simplicity.

GNU ls command has 5000 loc. I cannot even begin to fathom why. The more the LOC, the more the surface area and the more chance you will get exploited.

Compare this with OpenBSD's ls. It's only 700 LOC. Secure systems choose BSD as their choice. And less code is one of the reasons.

As a hacker, RAM and cpu cycles are your currency. Spend it wisely. You may need to run your program on a PS2 joystick or on a droplet of water when the time comes.

I pick my tools based on some criteria,

  1. Should work on basically anything(washing machine, router, repeater, toaster, ac remote, alexa, car ecu, old cell phones, mouse, everything)
  2. It should be very small (Less than ~500kb)
  3. It should be composable.
  4. It should be FAST.
  5. It should not have an interactive interface. Except for some exceptions

Here are the available things in my toolbox.

Things that almost fit these criterias

things that I don't care much

temporary tools that just works for now

I spent insane amount of time learning these tools but the time I spent were worth it. I have accumulated knowledge that will never go out of style. When future generation looks into this article. This will still be relatable as long as we have ram based systems.

My goal as a professional software engineer is to port these atomic tools to every operating system humanely possible. POSIX, Windows, OpenWRT, whatever.

Why?

Because UNIX is the obvious solution to the problem of software. When you are driven by these goals, the new software does not matter. The new design does not matter.

Some examples

  1. Convert a markdown to pdf and print it
    pandoc -f gfm -t pdf | lp
  1. Connect to vpn
    openfortivpn -c config.h -p $(pass totp/vpn-pass)
  1. Other absurd but possible examples, 3a. Mounting a brain as a filesystem,
    mount -t humanbrain /dev/brain0 mybrain

Now you can cd into anyones brain and cat out the contents.

The technology is not there yet but if it's one day possible, this is probably how a UNIX person will do it.

b. Mutating a DNA using sed

This is how you mutate a human genome using sed

    cat dna.vcf | sed 's/geno-sequence/mutation/g' > new-genome.vcf

c. Trading cryptocurrency Trade and update in ledger

    curl -F binance.com/btc/inr/trade | ledger -u

stdout and pipes are your friends.

But for this you need atomic tools. Tools that helps you do anything you can think of. In this day and age, the one thing that is stable and secure is the C API and UNIX.

The entire computer world is built around UNIX and DOS. No one would even dare to create a different operating system. Because their favourite GUI app won't work otherwise.

Everything else that's happening in the computer world is just noise.

A hacker is not afraid to break things and build them again because everything is two or three pipes away.