Apple's proprietary Lightning connector is very well known. But do you know how it works? How is a cable authenticated? What can you do with Lightning? In this video we dive into the details of Apple's Lightning protocol - also known as SDQ and IDBUS!
Links:
- Twitter: / ghidraninja
- Patreon: / stacksmashing
- Nyan Satan's Lightning page: nyansatan.github.io/lightning/
- My DEF CON talk on Lightning: • DEF CON 30 - stacksmas...
- Saleae Logic Analyzer Plugin: github.com/nezza/SDQAnalyzer
Like all true professionals, you make it look so easy! Can't wait for part 2!
It is easy, tho.
@@xy4489 only for professionals
@@xy4489it is not
part 2 please!??
@@tomikun8057not really he just showed you how to do it
let me guess its just USB that is missing U
They should've called it the ASB cable, Apple Serial Bus. At least that would be honest because it's not fast nor universal.
@@Leonard_MT shouldn't it then be called adb?
@@RC2225 not to be confused with Android Debug Bridge
@@RC2225 Apple already made a connector called Apple Desktop Bus (ADB) and it was used for keyboards and mice.
@@RC2225 What would the 'd' be short for?
stacksmashing: See you again soon * Five months later... *
Its been six now
😂😂
Excellent instructions/explanations. Your voice clarity,tempo, and video presentation for some reason makes it easier to understand, learn, while also retaining the info. I had to sub and comment with my thanks for your work and expertise for me the layman.
It would be interesting to see the results from cheap knock-off cables and other 3rd party cables to see what they spit out and if it is legitimate. The extra stuff in the cable and the communications explains the licensing Apple pushes and the increased costs. It also explains why Apple would not want to go USB-C because they would lose money, data, and control over the cables.
Doesnt help when their shitty cable works with speed standards from the year 2000.
They did a gotcha and limited their new iPhone 15 base models to USB Type C with USB 2.0, but with the Pro Model having Thunderbolt. Touche Apple
I'm wondering the same thing, Apple cables are the worst for durability at the stress area where the cable meets the end. Some manufacturers do a much better job on the cable build, they last a lot longer.
They will soon
@@HoloScope the EU hit them once AGAIN with their bullshit and said they cannot limit any of it. lol
I always kind of knew there was something going on. My "genuine" apple cable would only briefly show a charge symbol before the phone would no longer respond. It seems the "genuine" chip in my cable was "taught the wrong response" hehe. Brilliant video, even a simple user like me can understand, and your graphics/editing are top notch! Another sub for your stack ;)
this is so insane. the cables are a genuine and certified scam and people are so jolly about it
I love your approach to reverse engineer the protocol. Waiting for part 2 :D
I always get excited when I see a new stacksmashing upload! Looking forward to the rest of this series
stack smashing detected (core dumped)
Cool =D You've made excellent progress there! Looking forward to part 2 =D
The algorithm just gave me this gem that I didn't know I needed to see. What a great video.
Great explanation, thanks so much for all your hard work.
I need the next video! This seems like a series episode and I want to watch all the episodes. 😂 Nice video, bro. I like to brush up some bits, and this type of video is very pleasant to me.
“Part 1” *_dips for 7 months_*
I haven't done much research yet, but I'd be very interested in comparing the advantages and disadvantages of USB-C vs Lighting. Anyway, great video!
Advantage: more money for apple Disadvantage: literally everything else
@@makuru_dd3662 Advantage; More durable than USB-C since there is no middle part to break. Advantage: Smaller than USB-C and takes up less space.
@@JamesR624 Is it more durable? At least in my experience, USB-C has been way more durable. Lightning cables tend to short out between pins 7 and 8
@@JamesR624 Lol! I have 9 year old USBC cables that still work like new. My Grandma has gone through another Apple branded lightning cable every other month since getting her polished turd of a phone.
@@griffin8062 not the cable, it's the port
Great Video. Already waiting for Part 2 :)
Wow thats amazing! Looking very forward to the next part
Being a software developer in the automation industry, i love this kind of reverse engineering videos. Looking forward to the next parts ;)
Great work! Can't wait for part 2!
awesome man!! eagerly waiting for part 2
fascinating. Neat how you can figure out so much from so little
Great video! It's really interesting to learn about the technical details of Apple's Lightning connector and how it works. I appreciate the clear explanations and diagrams, and the various links provided for further exploration. Looking forward to Part 2!
Awesome, thank you!
Waiting for part 2 😋
Thank you for yet another fantastic video!
absolutely fascinating, can't wait for more videos!
Looking forward to part two!
Having a knowledge like yours just seems like rocket science. Just awesome
My mind is blown. This video (these videos) are awesome. Thank you so much for sharing your knowledge.
Congrats to the 150k subcribers! and realy nice video !
very nice I love the breakout header you made.
This is really cool! Also, side note, would you do this same analysis on one the old 30 pin cables? It would be really cool to see the differences between the older technology and the newer!
Please continue! Your work is great!!! When is the second part coming?
WOW!!!! This is such a unique video! Never seen something like this before in my feed.
Amazing video, waiting for part 2!
Awesome detailed video now I want to see Type c power delivery and other protocols as well from you.
Woah this is amazing. I just came from watching Exploring The simulations video on adding USBC to airpods. This is amazing to see
Great explanation and neat graphics!
Hey, I love this video, cant wait till part 2
amazing video, cant wait part for other parts
Waiting for pt.2 for 6 months now
Where’s part 2? :(
Great video - lots of information and well paced. I'm looking forward to part 2!
Thank you!
part 2 when :(
Hey, awesome video, loved all the technical details! On a side note, what kind of logic analyser would you recommend for someone just getting into hardware security? The Salae ones you showed are a little outside my undergrad budget ;) Will an ESP32/Raspberry Pi Pico suffice for most beginner usecases? What if I'm dealing with negative voltage signals? Many thanks for your videos! Got here after LiveOverflow recommended them :)
You can get some very cheap ones on Amazon (like $10) - I think those are great in the beginning (and I still often use them)
@@stacksmashing alright, I'll have a look at those. Thank you so much!
@@aathish04 I've used micros in the past, they're nice but one bit me when it pulled my i2c lines low when it wasn't powered. I use a digital discovery at work and it's amazing, especially with its high speed adapter kit. Very clean signals.
Personally I bought a 70$ one on Amazon and it does more than enough for me. Have used it a good bit. Probably the 10$ one would be enough for most to be honest
Having worked on embedded projects that communicate with iOS devices before, I'm very interested to see where this goes. Some of this I recall from the spec; other parts it seems they don't even share with their MFi partners. I will not be sharing more information, as I don't even remember what I can and can't legally say.
MFi NDA
They were doing funky stuff with the 30 pin cable back in the day as well. A mix between analog and digital. I may be recalling this incorrectly, but I believe you had to do some dance applying different resistances to different pins in a specific order as part of the handshake. Really finicky stuff to get right. Different devices would react slightly differently to that handshake, to the point where even the different storage options of the same model of iPhone/iPod had an effect. You really had to test every permutation many times (50+) to be sure it worked. But take the details with a large grain of salt, I just did the testing. I remember this from hearing the engineers complain about it back then. I could be wildly wrong on the handshake part. I'm not worried about an NDA because I never signed anything like that with Apple. And the company where I got experience with this went bust a long time ago. Plus I don't think they really care about the 30 pin connector anymore, as long as you're not going around putting it on commercial products...
True. Like your exp, even in future, even for USB they are circumventing the standard protocol. USB already has data, power, fast charge etc. as standard - Apple is using only basic power from standard set, and they are using proprietary specs for other things (usb 3.1+ data speed, fast charge etc). All in the pretence of customer safety :)
@@rahuls4863 as louis rossman quotes, "safety and security!"
@@rahuls4863 I have a feeling the EU will strike them down for that.. or at least try and say "you know what we meant, we're not tolerating *malicious* compliance, do it like everyone else does"
Take this subscription, you deserve it. Quality content.
Wow. Heavy nice work Bro. Thanks 🙏 4 content
This was such a dope video when part 2 gonna drop it’s been 4 months
I wonder, would this be able to debug an issue on a dumpster iPhone I found recently? I failed to flash iOS onto it, no matter if recovery or DFU mode, it always errors out or reboots at some point unexpectedly, and I have no idea what's wrong with it. I suspect a broken flash chip, but I can't tell for sure.
I doubt it to be honest :)
Send it to me. One of my iPhone's rudely erased all data on me after changing passcode. 2 failed attempts and I freaked out shut off the phone (despite the glitch yes the GLITCH) I rebooted the iPhone thinking it'll solve the glitch but I did not know what I just done and bam first passcode attempt and it is erased everything. (It may have been poor wifi during request passcode change so from now on anytime I change it I make sure wifi is flawless beforehand!) Anyways the point: this erased iPhone can still jailbreak using i2c box and even shows the iOS version 13.6.0 I am blaming Apple here. If it did erase "all data" then why the heck is it able to do this? P.S. This type stuff makes me want to sue company. False advertising IMO.
Really love your videos. Waiting for Part 2! :-)
Omg you are explaining it very very well done 👏🏾
"in the next video?" what!? fastest 9 mins ever. what an awesome video.
Thank you! :)
I am subscribing immediately because this is mind blowing! 🎉
would love a second part if you have time :D
Awesome thanks for explaining in depth.
this is so interesting wow! im now very curious about a few things tho. 1- How do splitters work? for example i have a very cheap aliexpress splitter that basically lets me plug in both charging cable and lightning earpods on my iphone at once, im guessing this thing is 100% passive but i have no ide and im not about to destroy it rn tbh. but if its passibe how can it communicate with both things at once? and if active, how does it get to split these two things? 2- does the cable reply to the device which charging capabilities it has? like if it can do fast charging or not, or is that linked to the modle number or name itself? 3- does the cable also talk to the charger it connects to? like does the apple PSU get any information about the lightning cable or device? apart from power delivery on fast chargers that is, especially curious on the old usb-a 5w and 10w ones and 4- how do fake cables work then? ive had bad luck getting some knockoff ones bc they would charge very very slowly and im thinking if it might be bc the controller was answering stuff wrong and the iphone has some sort of anti-illegitimate mehcanism or something or if it just replied as if it was the slowest charging cable that exists, i really hope youll check this stuff at some point plz! btw for reference this is the splitter i have (different store same thing tbh, not great bc it requires regular cleaning for it to work, also if u dont have experienc with aliexpress choose the aliexpress saver shipping unless its wayy too expensive for u bc at least in spain that option takes 2 weeks but the caniao expedited economy aka tghe default one for this takes months) www.aliexpress.com/item/1005004576959652.html
Wow. As an Apple employee at a Genius Bar, this video brought me a lot. As I love giving my customers some details about their products, this is a lot! Until now, just said that their cable is not only a cable. Now I can explain that there’s a real chip with which the iPhone is talking to. In an other way, can’t understand why we have not tools to determine if a cable is genuine or not.
Respect man. You are truly awesome
You are super good at reverse engineering. Extremely straight forward and informative.
Awesome video. Loved every bit of it (pun intended).
Can't wait to see the next video!!!
im sold, new sub over here, im waiting for part 2
This outdoes the video I uploaded about Lightning cables, lol. Excellent job! Very informative!
Oh do you have a link to that? Do you mean this one? kzhead.info/sun/n9OPeriEjKx3YKM/bejne.html Nice channel :)
@@stacksmashing Thank you! Although I still somewhat envy your technical abilities, haha. I've worked with electronics for a very long time, but I wish I was more proficient with logic analyzers, scopes, etc. I've seen your videos before, particularly the AirTag one. Excellent stuff!
This dude is pretty cool 👌 you have earned a well deserved sub 😁
This was honestly really interesting to watch
Thank you! :)
This is great part 2 can’t wait … there are some interesting other projects that might be able to be integrated with that tamarin cable, not very sure what “level” of signal processor / logic analyzer is required. But I have seen some open source logic analyzer on hackaday that use the PIO cores to get up to 24 channels , 16, 8… pretty sure you could pipe the GPIO that’s handling that communication into the other cores and have the ARM cores act like a TCP server to send the data through the USB connected to the PC to double as tamarin / logic analyzer . Very cool project hope there is part 2 , and maybe some Lightning peripherals? Like lightning to usb hdmi hubs ? Get the readings from those ?
Amazing video. Please keep it going!
you remind me of Ben Eater, not comparing efforts here, great video. subbed.
Guess I have to subscribe to stay tuned!! Also what analyzer do you use?!?!
thank you!! can wait what next!!!
What a madman, this video was AWESOME!
Fascinating! Thank you.
Great to see you back on the scene. Superb content delivery. Are you planning on working on a possible jailbreak?
fun fact, iPad Pro gen 1 and 2 use all 16 pins on lightning for usb 3.0 speeds (in conjunction with a usb-c to lightning cable)
Interesting, I didn’t know! Thanks :)
Been waiting for pt.2 for two months now
This video got me all charged up. Positively electrifying.
This is interesting. Thanks for sharing.
you are a gem!!! thank you for this video.
This is so incredibly awesome
Eagerly waiting for part 2!
This is excellent!
Wow, nice one. For how long did this channel exist? Subscribed.
Thank you for your very detailed technical sharing, why can't I find the second part, thank you.
Perfect timing, just before they are forced to use USB-C :D
let's hope they dont manage to get around it
@@-aexc- I think that they announced that they are going to follow it.
@@altayakkus4611 They have confirmed they will follow the law. The law mandates USB-C for charging. USB-C connectors are already a clusterfuck used for many different standards, and rumors are already that the USB-C cables Apple plan on the next iPhone will need Apple certification for full functionality.
@@-aexc-Everyone should have been forced to use USB Micro.
Keep up the good work
I have no interest in this space but LOVED this vid because it as so clear and well produced.
Really really interesting.... Dumb question/idea.... Would it be possible via rpi0 or RPI pico to convert video signal from lightning to uvc USB gadget mode?
Wonderful video. Thank you!
Love the content 👍
Good used analyser experience !
Thanks for your sharing
Didn’t understand a single word, but hey man, nice video, enjoyed it 😄
Wow you are a great communicator!
Thank you, appreciate that :)
I want the next video this is so cool!
Before watching the video, I thought that embedding the chip in the USB cable was stupid, because it costs more and creates more waste. Now, I'm waiting for the next part.
Wow, very great explanation. I was wondering if it's the same thing with the PMICs shorting out on the 6 and 6s+, does it explain the PMIC shorting when plugged with a non-genuine cable? Or is it just coincidence ?
This is awesome
Algorithm sent me here, and I’m glad! Can’t wait for the rest!
I wish you would do longer videos instead of these 10-minute parts, thanks for the content though, keep it up. Looking forward to making my own cable.
I know what you mean - it’s pretty intense to produce though :) I might try some longer content Thanks for the feedback!
10 minutes is ok in my opinion
Awesome video
You should try teaching profession! Your simplicity in presentation and effective communication makes it easy to understand and learn.