# Debugging Python Operator Precedence With MacsBug

DevFeed: [Debugging Python Operator Precedence With MacsBug](<https://devfeed.tech/articles/debugging-python-operator-precedence-with-macsbug-27356.md>)

Original publisher: [Read original article](<https://saagarjha.com/blog/2020/04/22/debugging-python-operator-precedence-with-macsbug/>)

Published: 2020-04-22T00:00:00Z

Content type: article

Language: en

Sources: [Saagar Jha](<https://devfeed.tech/sources/saagar-jha.md>)

Topics: [ctf](<https://devfeed.tech/topics/ctf.md>), [debugging](<https://devfeed.tech/topics/debugging.md>)

Tags: [ctf](<https://devfeed.tech/tags/ctf.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [mac](<https://devfeed.tech/tags/mac.md>), [mac-os](<https://devfeed.tech/tags/mac-os.md>)

## AI overview

The article recounts solving challenges in PlaidCTF 2020, focusing on The Watness 2 reversing challenge. It describes identifying the challenge as related to a prior WebAssembly-based puzzle and opening its StuffIt archive using The Unarchiver.

## Source excerpt

I'm a Capture the Flag (CTF) player with Shellphish, and last weekend our team participated in PlaidCTF 2020, an event organized by the Plaid Parliament of Pwning (PPP). As a pre-qualifier for the DEF CON CTF 2020, it's historically been a fairly challenging competition-this year our team only managed to place 17th, slightly below our usual performance, as many of our team members were preoccupied with inconveniently-placed project deadlines. However, the rest of us had a great time working on the challenges; I helped solve two, golf.so and The Watness 2. golf.so was released early in the CTF and asked teams to create small shared libraries that would call execve("/bin/sh", ["/bin/sh"], ...) when LD_PRELOADed in to /bin/true; a number of us worked together to solve this fairly quickly, getting under 194 bytes (the requirement for the full 500 points) with some aggressive but straightforward segment overlapping, careful trimming of "required" but leniently checked fields, and stuffing of code into the remaining header bytes that were required but could be set to fairly arbitrary values. Some teams golfed it further to 136 bytes, although I'm not sure how (or why, beside bragging rights) they did so. The Watness 2 took longer and in my opinion was a bit more interesting, and this is the one we'll be talking about here.