iTerm2 Customizations for Hackers

I use iTerm2 exclusively as my terminal of choice on the Mac platform. In fact it’s in the top 10 reasons why it would be incredibly challenging for me to ever leave the Apple platform.

I’ve added a few customized triggers to help me as a penetration tester. These are all regular expressions which iTerm2 uses to analyze console output and will perform an action when the pattern matches. The triggers can get pretty complex (help page on triggers).

Trigger actions
Trigger actions

If you have any more customizations or ideas for iTerm2, I’d love to hear about them! Find me on Twitter @beyondnegative

To set this up, open up your “Preferences” in iTerm2 and go to the “Advanced” tab:

Screen Shot 2018-01-15 at 07.41.15

Triggers -> Edit

Screen Shot 2018-01-15 at 07.42.07

To add a trigger, click on the “+” button at the bottom left of the window (not shown)

Highlight IP addresses:

  • Action: Highlight Text
  • Colors: Text White, Background Red

Screen Shot 2018-01-15 at 08.15.16

Highlight MAC addresses:

  • Action: Highlight Text
  • Colors: Text White, Background Dark Red

(See highlighted MAC in IP highlight example above)

Highlight the tail of suspected base64:

  • Action: Highlight Text
  • Colors: Text White (my console default text is a lighter shade of grey), Background Black

Screen Shot 2018-01-15 at 08.15.29

Highlight suspected LM or NTLM hash:

  • Action: Highlight Text
  • Colors: Yellow Text, Black Background

Screen Shot 2018-01-15 at 08.15.04

Highlight a disabled LM hash:

  • Action: Highlight Text
  • Colors: Dark Yellow Text, Black Background

(See darker yellow hashes in example above)

Alert when an Empire agent checks-in for the first time:

  • Action: Post Notification
  • Message: Empire beacon check-in

Screen Shot 2018-01-15 at 08.10.00

Alert when Nmap is done scanning:

  • Action: Post Notification
  • Message: Nmap Scan Finished

Alert when a Meterpreter session opens:

  • Action: Post Notification
  • Message: Meterpreter Session Opened

Alert when enum4linux is done:

  • Action: Post Notification
  • Message: Enum4Linux Complete

Alert when Responder captures a hash:

  • Action: Post Notification
  • Message: Responder Hash Captured


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s