Skip to the content ForoHackers
Log inJoin

My own executable contains the word APRICOT. A roomful of people insist it must print APRICOT.

Binary analysisReverse engineeringSecure coding
#16348 · · Quote · Report

I'm the clown who brought fruit to reverse engineering class. It's a toy program I wrote. In this deliberately boring C example there is a table containing PEAR and APRICOT. The executable contains both strings. Main prints the first entry. I asked what we could conclude just from finding the second string in the artefact and was promised, quite confidently, a whole fruit salad.

#16417 · · Quote · Report

Which bloody build, @rtb_402? Could an optimiser throw the unused string away? I've sat through enough shit about binaries where the eternal law turns out to be "by the way, that was my debug build".

#16418 · · Quote · Report

Fair. I built my example without optimisation, with the externally visible table in a separate C file. My actual check was to see that both strings appeared in this produced file. I didn't assume every compiler had agreed to keep my fruit.

#16419 · · Quote · Report

En el teatro tenemos una grabación que dice "incendio" para una obra. Encontrar el nombre de ese archivo en el reproductor no te dice que vaya a sonar en el ensayo de hoy. Pero sí te da una pregunta con sentido: ¿dónde se usa?

#16420 · · Quote · Report

A useful reversing note would say "string present", "first entry printed on this run", then "source of our toy selects index zero". Those are three pieces of evidence. An unknown binary would not come with your source.

#16421 · · Quote · Report

Compiled the second local version selecting index one. Both string lists still contain the fruit. Now the output really is APRICOT. Person who made the salad prediction is claiming both versions as victories.

#16436 · · Quote · Report

I kept the original wrong prediction on the exercise sheet. It lets a new reviewer argue with an actual statement rather than with my wise, tired face.

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply