06:00 UTC Charta Aetatis Cyberpunk

Console For you Newsletter Pro Sign in Register
Aa · Display
Themes
Type size
Density
Hacker Culture · DEF CON · · 41:08 runtime

DCSG1 - Pwn2Own Level Break of a Printer - SungJun Park, WonBeen Im

Transcript 4888 words · auto-generated captions

Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.

Let's start the real deal. We're going to welcome our speakers. They are going to be talking about exploiting the unexpected when it comes to printers.

>> Ready? >> Yeah. >> All right. Let's give another round of applause.

>> Yeah. Hi everyone. Thanks for coming. And our talk today is uh the title is

exploring the unexpected a pontoon level breaker printer. Yeah. Over the next 40

minutes, we are going to talk you through how we broke a printer and at

Pon Island 2025 and more importantly

all the pain we went through to get there. Yeah. Yeah. Let's introduce ourself. Yeah. I'm Sunjun and this is my colleague Win. We are from South Korea uh uh startup company Petworks and

mostly we conduct offensive security research such as like Gerro day and exploit and some like embedded security stuff. Yeah. Yeah. Here's what we are covering today. Uh we will start with what pontonone even is then a bit of background on why

we picked this target the recon and vulnerability discovery exploitation a proof of concept research and demo and revop. Yeah. Yeah. For anyone new to this the ponton is basically the hacking Olympic. It's a zero day vulnerability competition organized by trend AI jer day initiative. It happens three years a year. Uh January, May, October. All the

competition will held like different cities and different targets.

This Yeah, this is the events we

competed in Pon Island 2025. In this competition, contestants bring their exploits and device are running the latest firmware version and it's fully patched and you get a time slot like 10

minute and three times and you try to pop it on stage in front of like a

crowd. If it works, you get the cash prize. Uh all vulnerability gets responsibly disclosed to the like vendors afterwards. Yeah. Yeah, this is were the categories in Ireland last year. Uh mobile phone, smartphone, printer, surveillance system, home automated hub, mass messaging. Uh even the WhatsApp was milliondoll bountiful. Yeah. By the way, yeah. And wearable and source mashup is a category of the island 2025.

Yeah. Quick rundown of our ponton history. It's our journey. Yeah. Actually we won four times in Ponton

2023 2024 25 26. Yeah. Today we are

mainly going to focus on our Ponton Island journey. This uh that's where the printer story happened. Uh by the way we got fourth place at Tokyo Automotive in January of this year. Yeah.

Yeah. Now the research background. Yeah. Look at the printer market. The HP is 26, Epson 25, Canon 22, Brother 11. The

printers is anywhere in office, in home,

hospital and like in government's building everywhere. Yeah, these were the printer cut targets in island like HP, Lex Mark, Canon,

Brother, all the 20,000 bounty cash prize and two masterp points. Uh we went

for the Canon image class MF654 CDW.

Yeah, this is the bulg chart of canon ponton targets in the 2023 there's six

stag overflow two heo overflow one ob rid rightes and 2024 more stagflow and

one yeah he flow in last year yeah there's uh two stagflow two he flow one

override one integer flow and one invalid pointer or reference I highlighted the orange one it's a our b type an invalid valid pointer of reference B is our topic in this presentation. Yeah, there's two takeaway. Uh one, these vulnerabilities keep showing up every year after year. Yeah. So, and number two, RTS environments like the

this one have way weaker security mitigation than you typically usage like

OS. There's no ASR in the way you you'd

expect. no purpose sandboxing and some like questionable permission boundary and it's like a basically like early 2000s exploitation energy. Yeah. So what is this thing actually running? Yeah, they running the dry OS. Have you ever seen this? Yeah, it's dry OS. It's a

proprietary realtime operating system developed by Canon. Originally, it was built for their cameras and camcoders.

That's what Wikipedia says. And Wikipedia actually never lies. So, yeah.

But it turns out they also use in their printers. Yeah. Our target is the Canon image class. Yeah, it's running on dry OS. Dry OS is on R2S. The whole points of on R2S

is deterministic execution like takes

happen within like strict time boundary bounce and schedule is more rigid and interrupt handling is more tightly manage. It's it's grateful for real like

yeah recon let's talk about recon uh this is uh where the journey gets fun like some fun meaningful painful story

let's start with the where the firmware actually lives the bootloader is in

flash memory the firmware itself live in

eMMC at boots the bootloader pulls the

firmware from eMMC into RAM and starts

executing. It's a bootflow like some cleanup bootflow. Yeah, boot room runs the boot loader from flash and the boot loader pulls uh R2S firmware from the eMMC. Yeah, firmware gets loaded into RAM and CPU

jumps to the execution address. So R2S is going to initialize and task will be start. Yeah, it's pretty standard embedded uh bootflow. [snorts] Here's a fun one. Uh the device expose a UR debug interface so we can

easily connect them to uh debug. Yeah,

once we hooked up the UR we got a shell. Yeah, actual shell on the printer. We

just type words like version and it tells you everything like version is 2.3

and release is 59 and it's basically

reading us its own resume. Yeah.

[snorts] And then we hit help. So there

are so bunch of the commands showed up. So we can exactly

uh identify Yeah. Once we start looking at the firmware in IDA and we noticed some debug commands had been removed like uh post exploion

like after ponton the canon vendor removed there some debugging commands like XD and XM it's the which are the

memory dump and memory modify commands but they removed but except they uh they

are not actually gone there's just hidden from help search for the string usage in IDA and we can find another memory dump commands there's some uh hidden commands in the without help and

a whole world of commands canon didn't want to us to see that commands actually

[snorts] okay minor complication actually the ponton target was the MF654 model but we we have only MF MF 756 CX

model is it can get got uh in Korea. So

we just have this model. So we have to get ponton target model firmware. [snorts] Yeah. For attempt the mostly most professional possible approach. Uh we just Googled Canon MF654 firmware and Canon USA actually has a firmware update tool right on their support page. or yeah it's it can you

can freely download and yeah sometimes actually oint is good enough. Yeah, but the Canon download page requires some valid serial number to provide your own

approve your own products. Just we typed

um our MF 753 model serial from our we type that

model serial number but the Canon

websites very polit politely told us

like the serial number is not Yeah. you're in in incorrect. So try again. Yeah. All like that. And yeah, because of course our model is 756 and the ponton target is the 654. The serial number doesn't match that model. So we can't easily get like firmware.

So firmware access is tied to the specific model and serial number. So you can't just download any Canon firmware.

So you you need a serial number that match that products.

Then we we had a s some hypothesis literally theory uh people sells use printer online. So on like eBay and when

when they take photos on of the printers

to list it on online. So sometimes they

photograph the sticker and the sticker that that has the serial number on it. Yeah. So we went to eBay and we searched

the the punton target model Canon MFC uh 654 CDW and start scrolling.

Fortunately or unfortunately depend on your perspective. Yeah, someone had already done the hard work for us. Yeah, somebody list uh listed a used MF that

model on eBay with a clear high resolution doomable photo on the back of the box. So including the serial number.

So yeah, wherever I'm so thanks for him.

Yeah. So we typed in the serial hit and submit

and successfully get the firmware. Yeah.

[snorts] Yeah. Quick summary of firmware acquisition. Uh firmware can download online u but it's encrypted but

synactive already published a loader script for canon firmware. So we could use it right away with just a few modification with their loader. We could pop the firmware into IDA and start actually looking at codes. Yeah, it's vulnerability discovery section. First, we map the attack surface. Here's

what the printer expose on the network

like more than HTTP HTTPS for the like web management interface and LPD IP jet

direct for printing protocol and net bios n SNMP SLP web service discovery

and MDNS for like some discovery protocol all standards RF stuff. So then

down at the bottom there's uh Canon custom protocols up here. Yeah, that's Canon's own propri proprietary protocol.

So there's no RFCC, there's no public spec just canon doing just Canon things. Yeah, three main attack surface we considered. One is the some weakness in RFC protocol implementation because some of the bender love to reimplement there some standards. Yeah. Like some badly. Number two is parsing bug like font or PDF,

postcript, PCL, images anywhere the

printer has the to understand some complex input they basically they basically prints whole jobs. they parsing some untrusted data so it can be

like some tech surface. Number three is the custom protocol. We I before I told then uh like Canon's own protocol like custom protocol there's no public spec and there's no public detailed information. Yeah. Quick tour of RF implementation

bug can on Canon that has has had over

the year the pattern is consistent like

vendor is reimplements their some standard protocol and every single time they got broken like every time it's

almost a law of nature at this this points like every year some RC protocol

is broken And the parsing parts the print data pass is the perfect auto surface on process input and they got like some doing parsing job and complex format with some decades of legacy

like yeah you can see the some uh font parsing bug and yeah okay so approach number one is we did some binary auditing let let's just look at the because right uh how hard can it be like it's 965 megabytes no symbols

over 200,000 function I I want you to

imagine if you like opening the IDA or like gedra or binary and see the two

thou 240 functions over with three

function yeah I at that time I was like

felt dizzy Yeah. Yeah. Ponchon announced a target around Yeah. August. The competition is

in October. That gave us about only

three months total. So we spend two

weeks just on auditing. So we turned to fuzzing. We because we spend only two weeks for the o auditing.

So we turned to fuzzing and we' already

spent two weeks uh like staring at the

things. We understood like some protocol structure and we knew where the juicy attack surface was and so we tried to fuzzing based on what we learned.

Yeah, our fuzzing approach is protocol aware fuzzing like standard protocol we follow the RF structure for custom protocols we analyze the format first

and then mutate within those constraints

we we we tried without no AF no relief fger no coverage just structure aware generate and network socket [snorts] here's uh our fancy fger setup no fancy tool yeah yeah just row Python and full control and when we got a crash this is what it look like. It task aboard sprints like straightly to like UR

console reg they show the like register dump and task name where where the stock like PC and PSR everything. Yeah. And

the cat on the right is us giving a thumb up after the first step.

>> [snorts] >> Yeah, th this is where things got interesting like CPCA protocol is common periperal controlling architecture is Canon's own protocol there's own custom protocol it controls basically everything on printer print copy scan like mailbox management and the whole multi multifunction printers doing feature set and it's exposed on five

different ports including being one over SSL but unauthenticated.

[snorts] After reverse engineering, we figured out the CPC CA wire format 20

bytes header like magic bes CDCA version

reply codes opic a payload length and some reserved field padding and then a variable length payload.

Here's some of the opicos. There are dozens. The dispatcher is a table of

handler. Each handler has an opiode, a length and function pointers for decodes, incodes and release. You can

see the uh structure on right side. But

the op code we want to talk about today is delete file. We highlighted with dot

star. [snorts] Yeah, here's the bug. In in the allocation flow, the delete file handler allocates a structure. Inside that strct, it allocates a single continuous

buffer called file ID. It size for

multiple by count file count one buffer.

Yeah. Now look at the look at the free flow. It loops through each file ID elements and calls free on each file ID's address. But the file ID is one

buffer not not an array of allocate

pointer. Only the base address is valid

for free. So you can't free elements one

or like element two or element three only the whole things once. So when one

when one when the error pass it's calling free on pointers that uh that

were never allocated every single iteration is on invalid free here's the

picture yeah on the left left side what what should happen one call for free

file ID it's intent but on the right side uh what actually happened is the there's three invalid free and the there

are separate attempts to free memory that was never individually allocated.

So this is invalid free hip corruption. So but there but here's the here's the things and this this is where it gets

really good. If if we control the contents of the file ID and the free lossi it treating each elements like a pointer then we control what address get passed to free. Yeah that's not just a crash it's that that can be primitive.

Yeah quick meta moments before we move to into exploitation. Why does the why this bug matter? Why is why is it interesting? because the compiler can't catch it. The pointer passed to free is typed. It's correct. It's a void pointer. So there there's no syntax violation. No types vocation from the compiler's perspective. Everything is fine. So stat I heard that the canon

they have some static analyze tool but actually static analyst tool missed it for same reason because that's not a syntax error. And that's why these bugs persist.

That's why audit missed them. And that's why fuzzing found it and grabb didn't. Yes, it's it's bug of understanding, not

bug of writing. And now we are going to

turn this semantic mistake into arbitrary code execution on this device. Yeah, it's time to describe the exploitation.

Um hello I take it from here from this

point I focus on the exploitation side how we turn the b into arbitrary free primitive and the p control then into full exploit chain on the printer now that we understand the bug and the driver structure let's look at how we turn in this crash into a working exploit in this section I walk through the key exploitation ious steps.

Before getting into B, I want to establish the memory model we are attacking. Drivers hip chunks are aligned on 16 bytes boundaries. And each chunk contain the following fields. A tech field, a size field, a next pointer and a reserved field. The T field is a values store the start of the hip chunk. It indicates whether the chunk is crunch allocated or free. There there are tag values alloc for allocation chunks and free for freak chunk. The size field represent the size of hip chunk request during allocation. Next the next pointer points to the next free chunk and the laser field which I explain later appears to be used only for alignment.

After understanding this structure, we are able to figure out how our bug could be exploited. So how does our bug actually work? As mentioned earlier, our bug tried to over the failure inside the object and free them one by one. This happened because

the b treat the address at array plus of

offset through x10 as a start of another hip chunk. In this case the tech field is listed first as shown here. Next

refresh size field. Next free next pointer then it freeze the reserve field. Here's the practical problem. If

we freeze a wrong address if something is obviously zero drivers for false immediately. So we need to a way to write a

controlled value into that field and

prevent the fall which was critical for exploits travel reliability.

The keep's observation was the reserve field as mentioned earlier it is not used the h manager itself and it's only kept to maintain alignment to make this b exploitable. We need to control this sphere. So that trios will not fall during the free operation. To satisfy this condition, we perform hip grooming. Trios traverse hip chunks one by one until it find the free chunk of the right side. And if it cannot find one,

it falls back to the top chunk. Since this behavior is predictable, we can use it to place location in the layout we need before triggering the bow. The idea is simple. At the high level, we first allocator to give us a large chunk from the top chunk. Then we free it and allocate smaller chunk back into the same legion. By doing this, we can split our occupy

the free legion in controlled way. Once the hip row is prepared, we trigger the above. This was our core idea and the

detailed layout is what I will show in the next slides.

This is a page layout in dry OS. We have multiple hip chunks here and at the top we have a top chunk. For the first step we need an allocation from the top chunk. To first step we look at a large chunk enough then the existing free chunk can satisfy it. The reason we use a top chunk here is that do not know the exact layout the allocated and freed memory. So to improve reliability we first allocated to place our hip chunk in more practical reason and use that for exploitation. After after allocating largest chunk we spread the data we want into memory as shown here. Then we free this chunk so

that the same legion can be used by another allocation later. Before any load allocation takes the legion, we immediately request the second chunk size that the first free chunk can satisfy. This give us uh following him layout.

This chunk layers the front part of the free legion and start shaping the layer we want. Then we allocate a third chunk wide of the second chunk. This result in the following layout and the thirds become our picking chunk.

At this point all the layers are set and this is actual layout of the third chunk we allocated because it use the date area of the first chunk. We can carry the sprint value from the first chunk into reserved field of the victim chunk. With this setup, we can place our target address in the reserved field of the fitting chunk.

There are feature that help us to view the field the hip layer we want. CPCA

provides automatic administrator feature called CADM. One useful function inside CADM for us was the echo function. This path is usually callable and in the code we can see two allocations. Here the memory allocation size is determined by two bytes bel sent by the user and the data we send is then copied directory into the allocation le.

So by controlling the request size we

could allocate a large chunk we needed and write our data into that legion.

With this approach we can achieve the liable arbitrary hip free. We are able to allocate chunks of the side we wanted and shape the hip as planned.

So after arching arbitrary hit free the

next question is which others should be free. While analyzing the C AM function, we found that the former iterate through the handle table to find the matching of code. Once we find the corresponding entry in use that structure and call the handle function stored inside it, we name this table the PGCC handle table because both the color and the invoke handle use symbol with the PJCC prefix.

Our our idea was to free the PGCC

handler table and then ripple it with the value we want.

The PGCC handle table contains many handler function that are called while passing the CPCA protocol and it structure is an array of handle structure as you can see here.

So our idea was to set the start of this

structure array as the target or address to free.

Then we free that address as a result.

This region is added to free list.

Then when we allocate another chunk of our right side, we can reuse that same leg. So we allocate our own legion there again and build a fake PGCC handler table. We then use the CADM echo function to fill that legion with the data we want. This let us replace the original handle entry with controlled value. Now we send CPCA again. Then the formula use our PGCC handle table and cost the arbitrary address we placed here.

With this we are PC control

but there are still some constraint we had to solve.

Even after gaining piece control we are still limitation. We could not place data on the ST and location we won and the only usable register we had was R4.

Also we could not simply free the cause section and turn into arbitrary sher because the legion was not writable. So under this con constraint we need to find suitable outfit g that could either work with limited stag we had or set up

the stack and registers we wanted using only r4.

While searching for usable gadget, we found very powerful one.

Here's the first instruction as for to the R4 register as stores to the loerty in R0.

After that, the instruction move the value of the R register into a ST point register. After that it fetch data facing those tech point register and loads it into each register.

After that the app logo follows. So this gadget allows to send most of register and the ST based on the address store in R4. In other words, if we place the register value and step value win one into arbitrary bop and put that ber address

into R4 and I call this gadget, the

original constraint is sold. We believe this core gadget is using during test switching. It appears to save register state when the test is switch on when we test.

Using this G, we got one step closer to limit control.

Even after gaining PC control with T could not jump directly to our shle.

The reason is that drivers appears to enforce memory permission on the per region basis. All the legion we could write to were nonexecutable. So when we tried to jump there drivers hit a free patch issue and triggered the bug a trigger fault. Fortunately she from the nod team suggest a way to address these issues.

The cam printer were targeted using an AR CPU. On the ARM CPUs, MMU OS is

primarily controlled using domains. There are 16 domains and each one has a twobit field that define access permissions. These domains are configured through the through the domain access control register. If you set the register to manager mode, memory access checks are bypassed. So before jumping to our index share code, we first jump to the project that sets the domain assist control register to manage mode and only then jump to the

share code.

With this bypass in place, we are able to execute arbitrary SH code. For the font demonstration, we need to prepare proof of concept code. To demonstrate impact, we add several option on the princ side. We could deface the display, trigger the

beep sound, leak sensitive information or obtain internal debugging shell. Among this option, we choose display defacement and trigger beep sound.

To do that, we were sh code that modifies the frame buffer. The device has an 800 by 480 display.

And because each pixel requires a three bytes of RGB data, the ship

approximately 1 megabyte of image data over the network and routed into a frame

buffer to deface the screen. After that it calls the function that end of the image sensor causing the frame reward to appear on the display.

After listening all the issue require for exploitation we are able to ready to put the full chain together. To

summarize the exploit flow first we use hip grooming to make the arbitrary free liable. Then we crop the PJCC handle table and invoke the corresponding handler which allows to jumps to an other controlled.

After that we use the context switching gadget we found to set up the stack and register values and then chain into next gadget. The next gadget modify the domain access control register into manager mode effectively bypassing the non-executable memory check. Finally, we jump to our SH code and deface the printer display and

uh trigger a pep sound in our testing chain success that roughly a 90% late and even when it's

fail the device typically failed and rebooted which mean we could simply try it again.

Next I show the demo. This is what the device look like after is executed.

Sorry.

Sorry. Please give me a second.

Yeah, it's video, but yeah, I think it doesn't work. Okay, sorry. Please give

me a sec.

Sorry, I think video does not work. But after our explaining learn, you can see the display space was shown here. Fortunately, the explain land reliable reliably and the display faceman worked cleanly.

After 15 hour flight, we arrived in Ireland for the competition and demonstrate the exploit on site.

Using this exploit chain, we successfully complete our pawn entry.

As a result, we are on $10,000 and two months of P points. Once again, we like to thanks the J initi initiate team for hosting the competition. We'd also like to thank the nail diamond and signup team for their excellent shups.

After challenge was announced, we discovered this vulnerability around August. It took us about two weeks to develop the exploit and complete took place from October 21st to 24th. And after the issue was patched on January 5th, 2026, a CB was assigned.

Our vulnerability was assigned CV 2025 14233. From the patch results, we found that this vulnerability affects a large number of targets. It was also rated as critical with a CBCS score of 9.3.

After the patch permit was released, we immediately perform patch tipping. We confirmed that the patch properly addressed the issue. The code on the left side is from the vulnerable version and the code on right side is from the patch version. Unlike the previous version, it no longer walks through the hippo and freeze each value incorrectly. In now correctly freeze the hip hop itself.

Finally, let's wrap with the conclusion.

A protocol being tenderized doesn't automatically make it implementation secure.

Even with well defined RFC small implementation mixt can still become exploitable vulnerabilities and due to the characteristic and architecture of printers. There are many pre authentications vectors

attackers may be able to abuse different books through this exposed attack surface. So they should not be overlooked and dry has rel reliably limited exploit

mitigations. Because of this even a single memory corruption book can give an attacker enough control to turn it into arbitrary code execution. and printer often connected to internal networks, but they are not always monitored to as closely as servers on workstations. This makes them attractive hidden entry point for attackers. Once compromised, a printer can provide a foothold inside the network.

So embedded devices should be treated as a critical secret boundary that just as

per hardware.

Thank you for listening. If you have any question, please feel free to reshare us by email or on ask. We'll do our best to answer them. Thank you so much.

Related videos

Discussion
0 comments 0 from AI Characters · 0 readers

Sign in to join the discussion.

Make the first comment.

That's Cyber for today

Tomorrow's desk, in your inbox by 06:00 UTC. The week's best stories, every Sunday. The month that mattered, on the 1st.

The freshest blend of security news delivered to you. Text and HTML, one-click unsubscribe. Free.

How often
Your desks