Blog
Jun 18, 2009
ITunes Reloaded – Getting the Shell
Exploiting iTunes, part 2
3 min read
Author: Matteo Memelli
There goes our Information Security
This is part 2 of our previous post about the Itunes exploit for windows.
…little did we know that all the payloads being sent have to be pure AlphaNumeric (printable ASCII). The first thing to do is find a Alphanum friendly return address, which was found at 0x67215e2a
Execution then gets redirected to our 1st stage payload. Due to buffer size and character set constraints, we do not jump over our return address as would usually be done. Luckily, executing the opcode equivalent of the RET address did not mangle the stack or terminate execution.
We then align the stack to the ECX register in order to set up our encoded payload:
ECX holds our purely alphanumeric first stage shellcode. This shellcode preforms a near jump, back into our buffer.
The following screenshot shows the decoded jump:
We next align EDX to point to the second stage encoded shellcode as can be seen here:
Our shellcode now gets decoded. A quick stack alignment is required to “reset” ESP and EBP to the total trashing of the stack state…and we get our shell!
Cybersecurity leader resources
Sign up for the Secure Leader and get the latest info on industry trends, resources and best practices for security leaders every other week
Latest from OffSec
Research & Tutorials
My Journey with IR-200: Becoming an OffSec Certified Incident Responder (OSIR)
Embark on a journey to become an OffSec Certified Incident Responder (OSIR) through the IR-200 course, as described by a Student Mentor who tested its effectiveness.
Jan 24, 2025
6 min read
Research & Tutorials
A Student Mentor’s TH-200 and OSTH Learning Experience
Explore the TH-200 course & OSTH exam with an OffSec Mentor’s insights on mastering threat hunting skills.
Jan 24, 2025
9 min read
OffSec News
OffSec Yearly Recap 2024
Join us as we explore all our successes in 2024, including exciting new content, courses, and so much more!
Dec 23, 2024
8 min read