Top
Best
New

Posted by scottjg 1 day ago

Reverse engineering my Coway air purifier to ditch the cloud(scottjg.com)
655 points | 192 comments
Aurornis 9 hours ago|
> The fan downloads its root CA cert over plain HTTP. It was always MitM-able.

The most fascinating part of this wave of LLM reverse engineering is seeing how many weird and poor choices were lying in plain sight.

Any number of people could have discovered and exploited this, but it’s tedious work. Most people who can do this are busy with their job and other things. Now LLMs enable people who understand these things to quickly get through the tedious parts, so they can do a lot more of this work in their free time than they could before.

godelski 43 minutes ago||

  > The most fascinating part of this wave of LLM reverse engineering is seeing how many weird and poor choices were lying in plain sight.
I think what's interesting is that for decades one group of devs has been pushing for higher quality and security while other groups have been pushing for "good enough" or "MVP"[0]. Clearly the group that rushed won.

But in some weird way we're coming to the day of reckoning. I'm sure we'll always have missed bugs but with a lot of what we're seeing it more seems like these were avoidable problems. Code issues I can easily imagine at least one person on the team said "this isn't acceptable, we need to correct it" and them getting overruled. I'm sure each and every one of you has seen, if not experienced, this.

It'll be interesting to see if that continues. I suspect companies will still rush but from my experience even the best models happily produce shoddy code. And there's a feedback loop, the model's performance is influenced by the code's quality. So it's easy to degrade and get into a bad feedback loop. But I think people still value speed over quality, even in this world where Microsoft shit the bed

[0] in quotes because the entire conversation is essentially about what is actually good enough and what actually is the minimum viable product.

tedd4u 6 hours ago|||
"The fan downloads its root CA cert over plain HTTP"

Would love to understand the decision-making behind this at Coway (or their firmware contractor). Anyone care to guess why someone would make this choice?

ryandrake 6 hours ago|||
Hardware companies by and large don't get software. They just don't understand it. Their world is sourcing parts and assembly and packaging. They look at software like any other line item in the BOM: Like a screw or gasket. You source it from the cheapest supplier, and spoon it onto the product somewhere on the assembly line. These companies simply don't care about their software, and their requirements to their supplier amount to "make something work." The quality bar is literally "customer should not return the product."
Aurornis 6 hours ago||||
> Anyone care to guess why someone would make this choice?

My guess: At some point in the past, a firmware was developed without plans to include firmware update functionality. The team that did this was later burned when the client tried to use a new certificate that the hardcoded, unchangeable system didn't recognize.

Angry meetings occurred, developers were chastised, and someone realized they could avoid that problem by fetching an updated root CA on demand. They did it over HTTP to avoid a chicken and egg problem.

In hardware manufacturing, everything is about crossing items off the list of problems. A problem was raised, someone came up with an idea to solve that problem, and it was implemented. The practice might have spread to other products because it became institutional knowledge about how to avoid a problem that made a customer angry once.

This is from my experience in the consumer hardware industry. If you're not watching the outsourced development closely, they will take the easiest route to solve the problem in front of them and nobody will consider any other consequences.

sippingabonedry 4 hours ago||||
Everyone (including the author) is as per usual focused on the wrong thing.

There is nothing wrong with downloading a certificate over HTTP. In fact, that's how PKI is designed and if you look at the AIA field of this very site you will see the certificate chain is meant to be served over HTTP.

What IS wrong is implicitly trusting an untrusted certificate. Whether it came over HTTPS or HTTP is irrelevant. But no one is talking about that.

I'm more puzzled why someone would buy a complicated IoT purifier for a drafty Bay Area house that probably has knob and tube wiring.

My most reliable air purifiers have a dumb, physical on/off switch. I bought them deliberately for that feature.

teaearlgraycold 3 hours ago||
People don’t understand things and act shocked when they learn apt and Steam packages are downloaded over HTTP. You only need encryption for private information. CA public keys are not that. But you do need verifiable signatures.
notaproton 3 hours ago|||
It kind of makes sense opsec wise when you are on a network with adversaries though.

1) Others knowing knowing exactly which package you are downloading could give them a very clear way to fingerprint and target services you are running

2) HTTPS could allow you to potentially reduce your risk surface in a case where there is a bug in Steam's signature checker itself and someone sends a crafted payload instead of game files. Server validation would have prevented that. This has actually happened with apt before: CVE-2019-3462.

Odds are small, but I believe in DiD. I could imagine an attacker with nothing better to do could get up to this on say, a Uni's network.

And before you come at me with I should be using a VPN to protect against these scenarios, I do that already. This is about HTTPS being a sane default when possible.

teaearlgraycold 3 hours ago|||
But we're talking about an air filter, not a production server.
notaproton 3 hours ago||
I'm all for Air Filters using HTTP!

The default for package upgrades on PCs should be HTTPS (as it already is on Arch, Alpine, NixOS, Flatpak, and Homebrew) since it reduces risk with minimal performance impact for most users.

sippingabonedry 3 hours ago|||
> fingerprint and target services

Or they could connect to the service.

> Server validation would have prevented that

No it wouldn't have. HTTPS does not ensure a server's contents are trustworthy.

> And before you come at me with I should be using a VPN to protect against these scenarios, I do that already

So you protect yourself from unlikely, irrelevant threats by... deliberately paying strangers to MiTM your traffic?

notaproton 3 hours ago||
[dead]
sippingabonedry 3 hours ago|||
I partly blame Google and Mozilla for the HTTP hysteria.

You publicly demonize something long enough and otherwise intelligent people start believing HTTPS is a magic invisibility cloak or the Good Housekeeping seal of approval for the web.

It is a tool in the toolbox and nothing more. Wearing safety goggles while making spaghetti is equally stupid.

whoanoway 3 hours ago||
[dead]
sitzkrieg 2 hours ago||||
did firmware a long time. had two PIs try to force this on me for an IoT device. i pushed back and we missed a deadline. but it uses aws iot certs correctly in a secure element. the customer knew better and thanked me later, lead to 1099 work
nijave 2 hours ago||||
3rd party SDK requires TLS and it's not easy to bypass. Development contract doesn't allow long-term support where they can push updates if/when proper CA bundle changes.

Solution: ignore security in 1st party code outside 3rd party library that tries to prevent ignoring security.

As far as I know, most of this cheap crap is basically supply chain management companies that contract a factory to manufacturer and contract a software development/IoT/chip company to write software. Everything is waterfall-style locked in with no ongoing support or funding after the production run is done. The software company doesn't care insomuch as it "works" and working to the SCM company is "powers on and functions", not "is secure". As such, there's not much accountability. If the endeavour gets bad publicity, they just close up shop and spin up a new brand.

dcrazy 6 hours ago||||
Probably something like “What if the cert expires?”
wallst07 6 hours ago|||
Control and $
eddieroger 8 hours ago|||
Similarly, how easy things are for more people to do. I'm certainly not advocating for pulling in a root CA over HTTP, but before LLMs could make this knowledge trivial, how many people would even think to look at that angle. It's democratizing in an interesting way.
tclancy 6 hours ago|||
It is an interesting thought experiment: what things happen once the inertia cost to seeing how something works collapses to 0 for even a small number of your user base. Smart companies might give in now and open up their app even if only as a read-only repo. Dumb ones won’t even know to consider it. And the huge middle will wind up getting new UX ideas for free.
tclancy 6 hours ago||
As a data point here, the people from Ting electrical monitors should really contact me. I used their app for a few days and then built something way cooler off of it and managed to run down what was causing our high electrical usage (the well pump serving an out of control ice maker). You can’t do this at any fine-grained level, but the well pump’s electrical draw was very recognizable by just having the data logged to SQLite in real time from the Ting api and then telling Claude when the pump went on and off.

EtA: I built a skill for it https://github.com/tclancy/ai-tooling/blob/main/skills/diagn...

mmmlinux 4 hours ago||
I remember when people were like LLMs write insecure code. Well, so does literally everyone apparently, Maybe that's where it learned it. I feel like that group has gotten a lot quieter lately.
Jolter 1 hour ago||
When some of my colleagues started using AI, their output quality increased markedly!
throwitaway222 7 hours ago||
This works better than all of the hepa purifiers on the market:

  1 20" box fan.
  4 20" mirv 13 filters (cheapest is likely costco or lowes or home depot - buy in a 4 pack to save money).
This is still expensive but the amount of air processing per hour is incredible.

More info Search "Corsi-Rosenthal Box" or click https://filterbuy.com/resources/air-filter-basics/how-to-bui...

Don't go hepa because it slows down the filtering too much. I use this technique in my house and it cuts down on pollen, smoke and mold. You'll feel a lot better than a tiny expensive hepa that has proprietary filters.

instaclay 6 hours ago||
True, but the MacGyver looking thing in the middle (or side,whatever) of your living room doesn't sit right with everyone. People pay money for aesthetics and take the hit on efficiency.

I'm seeing some 3d printed projects popping up that look to be filling this gap though.

Diederich 2 hours ago|||
We've been doing the $9 Amazon Basics fan with a good filter since wildfire smoke started really getting bad in the bay area, quite a few years ago now. We had a couple of big, expensive filter tower things, and they helped, but just a couple of the boxfans with filters duct taped on quickly and consistently annihilated PM2.5 and PM10 in our apartments.

Most surprising thing: all but one of those original Amazon fans is still running. They've had years of run time, at quite a bit higher stress than normal.

AnthonBerg 1 hour ago|||
Filtering out the fines and ultrafines – the stuff that HEPA filters capture – makes a biiiiiiig difference in air quality.

A smaller supplementary unit made out of PC fans and N95s can do that. A 120mm Noctua fan's flow and pressure fits well for about three 3M Aura masks in parallel.

It's unhinged how good the air quality is in a room with a device like this.

frakkingcylons 5 hours ago|||
I agree on principle. There are iterations on this concept that are much quieter, are visually more palatable, and still have high airflow.

Example: https://www.cleanairkits.com/products/luggable-ultra-air-pur...

Cthulhu_ 3 hours ago||
But that one costs $400, for that money you can buy a commercial / professional / design filter too. The Corsi-Rosenthal one is <$100.

If volume is a problem, I'm sure one can lower the fan speed below the lowest setting with some electronics knowledge.

vikramkr 5 hours ago|||
That rules! Looks like you can do it with like 3 filters so it's more triangle shaped which makes sense. That's so stupidly simple too. Also aesthetically pretty cool - would look great in a workshop where it's like function first/don't hide the mechanism. And I feel like there's gotta be clever ways to incorporate something as simple as "box fan but the box is made of air filter" into like a coffee table or stand or something else clever? Probably you'd want to hide the filters inside if they look grimy before you actually need to replace them so you don't feel obligated to waste money by replacing too soon but sounds like a fun time to figure out how to integrate that in a hidden way into whatever's your vibe without looking jank
CGMthrowaway 4 hours ago|||
What is the advantage of this over just sticking a merv13 in your HVAC and running the fan for 15minutes every hour? (assuming it's rated for merv13)
sailfast 1 hour ago|||
For me, it just doesn’t remove the particulates fast enough when they’re quite dense outside or the house is porous.

Better sealed homes might have better luck - it should work ok - but the best way to breathe filtered air quickly is to stick your head right above a filter.

gojomo 4 hours ago|||
You can drop a boxfan-filter combo anywhere, even where there's no forced-air HVAC.
snk 5 hours ago|||
In my bachelor days I put an air filter behind a box fan; women have higher aesthetic standards. mirv 8 works fine for me and I can pick them up grocery shopping, but my primary contaminant is a sheprador.
dcrazy 6 hours ago|||
I’m not dedicating 1600 cubic inches of my living space to an ugly homemade piece of furniture that I have to rebuild whenever I change a HEPA filter. I suspect I am not alone in this.
gojomo 3 hours ago|||
I was wondering when one of the low-end 20" box fan vendors would add a slot for a 20"x20" filter... and it turns out Lasko finally did, creating an "AirFlex 2-in-1" product that's often knocked for price/noise but resolves the homemade look, for those that care.
sushid 2 hours ago|||
I never get this take. Yes, you'd make this in a pinch but that thing is hideous to have around the house.

It's like telling someone they bought a car and pointing out that golf dimples with increase your mileage. No reasonable adult would have that thing in the middle of their living room!

joquarky 45 minutes ago||
I'll never understand how someone can care more about aesthetics than their health.
jedberg 6 hours ago|||
My brother in law did this. It is boxy and ugly, but damn does it work.
philip-b 4 hours ago|||
I would build one but I live in Argentina and I have no idea where to get any of the components.
conk 4 hours ago|||
Everyone wants the sound of a box fan and the looks of duct taped cardboard sitting in their living room...
Whatarethese 6 hours ago||
You can take it with you when your wife kicks you out of the house for making something so stupidly ugly even if its functional.
tda 5 hours ago||
I just liberated my Haier AC units. The WIFI modules it came with but that I never used turned out to be ESP32's, with solder pads for rx/tx etc. I soldered on some wires, plugged into a USB ot UART dongle and Claude had ESPHome running in no time. I now can not only control the AC units, but I have a lot more visibility into wat it is doing: coil temps, gas temp, valve positions: all is available and all is logged now. I also liberated my air purifier long ago by soldering a wire to the various buttons, so i can trigger a press the physical buttons from an esp32. And I soldered a wire to the PWM of the fan, so I can bypass whatever the onboard logic is doing. Liberating your own electronics is fun, and now with AI easier than ever. I also ditched the WIFI unit of my solar inverter and hooked up the tiniest ESP32 nanoC6 and now I get all the data at 1Hz. Still working on taking over the EcoFlow batteries and their charging/unloading logic.
nijave 2 hours ago|
Related, don't know if it would have worked with your system https://cloudfree.shop/products/ductless-hvac-wi-fi-module
smusamashah 1 hour ago||
This also means that we have a short window where products d hardware can be reclaimed by users. After a while, these makers will also start using LLMs to lock the devices properly.
bombcar 9 hours ago||
I took a Vornado TRANSOM, a Broadlink RM4, and a Shelly Smart Plug, a Qingping Air Quality Monitor Gen 2 + claude and HASS, and now I have a fan that turns itself on when the CO2 level gets too high.

And I can override or change it from Apple Home.

The smart plug lets it verify that the fan is actually running, (because it measures usage) and we worked out that after a power cycle the Vornado goes back to a known state, and we can find the speed by forcing it all the way to 4 and then stepping back.

nijave 9 hours ago||
Small world, just submitted PRs to add Vornado Strata 433mhz decoder to rtl_sdr :)

Need to try to get Sonoff bridge rigged up next but have been busy messing with Hatch alarm

reasonabl_human 7 hours ago||
Nice! I have a similar setup. You might like the custom visualization or temperature and humidity offsets I’ve made for that air monitor. Its screen and battery cause excess heat to throw off readings and the calibration is rough from the factory, I used a cheap bluetooth govee thermo-hygrometer as reference to build a better cal curve.
eande 7 hours ago||
It is great to see another cloud mandatory device set free. I noticed lately several such entries in HN and personally it is a good trend.

I am wondering how the big corporate will respond sooner or later. Because it is clear and they know that as well with the every rising capability of LLM more people will find ways to liberate their hardware from such unnecessary dependency and accept less the money drain.

MustangMatt46 4 hours ago|
It's so few hobbyists doing this that I doubt they care. Awesome for us though!
Eric_WVGG 7 hours ago||
Jeez. I've had a Coway for about eight years, such a good device that my whole perception was “good product == good company”. If I had known their IOT offering was such a POS I would think very differently.

That said, the non-wifi model works perfectly with a simple HomeKit compatible on/off plug, so all this work — despite being very, very cool — seems a little pointless?

anon_shill 6 hours ago|
Can't crank up the fan with an on/off plug.
camjc 10 minutes ago|||
Perhaps close enough for most; Can leave it on auto and infer the level from its power draw on the smart plug.
eldaisfish 6 hours ago|||
An honest question - is the privacy trade off for such a minor convenience worth it?
bob1029 5 hours ago||
Your central HVAC system is by far the best way to keep the air in your house clean. You can run the blower without heat/cool 24/7 without spending too much money. Most modern furnaces have variable speed ECM fan programs that slow down when no heating or cooling demand is present.

You can't install a true HEPA filter directly in a typical residential system, but you can have an HVAC tech install a bypass system in the air handler that would allow part of the air stream to be filtered via HEPA continuously. If you build the system (or house) from scratch and express your intentions to the HVAC contractor you could plausibly use direct HEPA filtration for 100% of airflow.

https://www.lennoxpros.com/healthy-climate-hepa-60-bypass-ai...

hamdingers 5 hours ago||
Based on personal experience, HEPA isn't even necessary when you're filtering that much air.

My house downwind of a freeway and a wilderness area, lots of nasty black tire dust mixed with allergens. It did not come with A/C. I had HEPA air purifiers around the house that I would leave in auto mode and they would run for a few hours a day based on the air quality.

Then I got central A/C installed with a standard 1" MERV 10 rated filter on the intake. Just running the blower for 10 minutes every hour is enough to keep the air quality in every room below the level where the air purifiers would kick on. I've given most of them away.

j45 5 hours ago||
100%. Understanding your air quality is important, since it can vary greatly based on so many factors, some other ones can be location, home type (condo, house), occupant types (seniors, small humans), health conditions (allergies, etc), homes don't always share the same kind of air circulation.
dgacmu 5 hours ago|||
HEPA is less important in most scenarios than "something that on a few passes will catch everything", which MERV-13 will do. Not all systems can handle the pressure drop of a MERV-13 but many can, and there are some pretty low-drop options out there if you search for them.
flanz_10 5 hours ago||
13 is better obv, but merv-8 is a great drop in for most systems, and it makes a huge difference. my system runs the fan for an hour every evening, and that also has been an improvement.

i have to do a major upgrade next month (30 year old gas furnace!) and i will need to do some research, but i would like to even ascend to true HEPA if it's feasible

j45 5 hours ago||
Mismatched merv levels between some heating systems (ie., forced air) and what they were designed for can also create strain on the system and premature failures.

Also, in new homes, beware of undersized heating systems that will fail prematurely.

nijave 2 hours ago|||
Had Claude build a Home Assistant integration for my Rheem furnace which exposes commanded ECM CFM, actual CFM, fan RPM, static pressure (among other things) via Bluetooth Low Energy.
jakeydus 5 hours ago|||
We don't have central air in our new home and man oh man does it get dustier. I did not appreciate the power of those cardboard filters.
ashdksnndck 4 hours ago|||
This is not a good choice for everyone. Before greatly increasing the load on you HVAC blower motor, make sure you first understand where it is, how old it is, and how inconvenienced you would be if it burned out.
metal_am 3 hours ago|||
There is at least one big downside to running the fan 24/7: you lose out on humidity control.
anamexis 2 hours ago||
Why?
nijave 2 hours ago||
At least in summer/cooling mode, I think the fan blows some of the condensed water back in the air off the coil (instead of it dripping down the drain). I think it still dehumidifies, just not as efficiently. Not sure if that's what op meant
zbrozek 5 hours ago||
Annoyingly, both Ecobee and (at least historically) Nest make controlling the fan independent of the heating and cooling hard. You have to enable either heating or cooling before being allowed to enable the fan. And you can't specify how long you want to run it for, but have to select one of a few options.
nijave 2 hours ago|||
Could just bypass with esp32 and relay. I think you just need to close a 24v AC switch/relay unless you have a newer/more expensive communicating system (although then I don't think you'd have an Ecobee)
flanz_10 5 hours ago|||
i have an ecobee and it was pretty simple to hit fan on even when system is off. this may be a limitation of your hvac system being exposed awkwardly through to ecobee. some systems have a "fan only" wire, which mine does. but my guest house is a much older system, and it is like yours.
zbrozek 36 minutes ago||
It's able to run the fan without either a heating or cooling call, so I'm not sure what would prevent it from doing so without making me choose heating or cooling first in the UI.
Lerc 6 hours ago||
I misread this headline and now I want a Cowsay air purifier.
floathub 5 hours ago|
/ Your reasoning is excellent -- it's \

| only your basic assumptions that are |

\ wrong. /

--------------------------------------

        \   ^__^

         \  (oo)\_______

            (__)\       )\/\

                ||----w |

                ||     ||
simonsarris 7 hours ago|
I have 2 Coway air purifiers, they have no cloud stuff. They work really well.

While this is impressive: Why not just get a not-cloud one in the first place? Why does an air purifier need to be controlled via wi-fi?

I'm against a lot of smart home things because its actually more maintenance, not less, to have to think about an object connecting to wifi, to have to decide whether or not to control it (what are you even doing to it?) And I suppose to have to write your own drivers or app. Why allow it to occupy this much mental space for you?

nijave 2 hours ago||
Not sure about air purifier, but I have a Midea dehumidifier and it publishes runtime and setpoint info I pull into Home Assistant along with power draw from a smart plug. I can see how often it's running at different times of the year and how much it costs. Ended up saving some money tweaking it from 50 to 55 after seeing runtime and A/B testing both.

Also auto on/off. If you put Home Assistant app on your phone, you can wire up automations that turn things on and off depending on whether or not you're home. Could also have Home Assistant pull in air quality/pollution info for auto on/off. High pollen count today? Keep it running so I sleep well. Low pollen count? Turn it off.

Maintenance is minimal. I set the dehumidifer up 2 years ago and haven't touched it since or had a single issue. Main thing is a) get it working, b) get it isolated from internet, c) never touch or patch it.

Once the data is in Home Assistant, I can also look for correlation with wearable health info. Does purifier running improve sleep? Does changing thermostat set point improve sleep?

HnUser12 7 hours ago|||
It’s just a remote control. Why did the tv started coming with a remote control. It’s convenient.

Setting up almost never takes more than a few seconds for me. I have Apple home, it’s almost always scan a QR code, wait a few seconds for wifi and done.

Also it’s fun to mess with.

palata 3 hours ago|||
> I'm against a lot of smart home things

What I like about IoT is the idea of hacking them :-). Of course I don't want connected devices running proprietary firmwares anywhere near my LAN.

Also one thing is that when a company sells an IoT device, maybe they mass produce it and it's cheap. Whereas if you wanted to build it yourself, it would be harder. Getting relatively good and cheap hardware and putting your own software on it is nice!

dcrazy 6 hours ago|||
The article explains why: the author’s wife cranks it up for white noise while they sleep, and the author wanted to tie that into their existing “go to sleep” home automation.
enraged_camel 7 hours ago||
>> Why not just get a not-cloud one in the first place? Why does an air purifier need to be controlled via wi-fi?

It is convenient to be able to monitor air quality from your phone, sourced from a device that is designed to improve it. Because then you can see how much of an impact it is actually making, move it to a different location with better airflow, etc.

I have the non-wifi version, and have to use a separate device for it.

simonsarris 7 hours ago||
I just occasionally move them. I know it is working because the pre-filter needs cleaning often enough. Does it really need "monitoring"?

One of the nice things about air purifiers, unlike owning a boat or leaving a stove on, is that its never going to surprise you in a bad way. You don't need to really monitor anything, it will just purify some air. Do you really want to be bringing that under the umbrella of the stuff you monitor? Maybe this is an irreconcilable difference and we cannot see it the other person's way.

More comments...