10 ms·
Intel Management Engine JTAG Proof of Concept
- dafrankenstein2 8y agois there any specific reason for using python 2 instead of 3 or it is just how you guys do it
- draw_down 8y agoOf course this is the biggest conversation in the thread. Ay yi yi, HN.
- Freak_NL 8y agoPython 3 is ten (!) years old and perfectly usable, but it suffers from a well-known, but curious problem where people who occasionally use Python for some light scripting tend to go for Python 2.7. Rarely it's a choice made because of library availability, more often it is because of the perceived ubiquity of Python 2.7 installs on the target user's computer or simply because of a mindset where Python 2.7 is good enough and getting the hang of Python 3 seems like a huge obstacle (it isn't). I'd love to know why this project specifically chose Python 2.7 too. Python 2 reaches its end of life in 2020, any new Python code should really be written in Python 3. By the way, if you want to prevent getting a bunch of downvotes like your comment did, be polite! Not including any capitalization or punctuation is considered downright rude by many. Your text reads like a robot's printout.
- josefx 8y agoYou forgot one reason not to switch from 2 to 3: Zero benefit. Nothing python 3 does would benefit my scripts to any extend over just using python 2 as I always did. Is learning 3 a huge hurdle? No, it is however in some cases completely unnecessary.
- rjeli 8y agoYeah, for writing scripts like this - python 2: 0% chance of thinking about Unicode. python 3: 5% chance i have to waste time debugging some random str decoding issue, no benefits. why bother?
- cmyr 8y agoPut another way: python 2 has a 0% chance of correctly handling Unicode.
- mjevans 8y agoNot actually the case. UTF-8, using only SPECIFIC operations that don't try to split up strings or replace things that aren't exact matches for a given text, will result in valid output as long as there was valid input. All interchanged Unicode text should be UTF-8, never use another encoding* (without a really compelling reason). No, storing it as an array of unicode characters isn't a compelling reason during interchange. ALSO, never use a BOM; that will break things. The second answer (should be anchor-linked) in this goes over MOST of the advantages of UTF-8, but it doesn't capture that some carefully input operations in otherwise completely Unicode //unaware// 'string' functions result in no change to string validity. The only potential issue is if recognizing something in different normalization representations is important. However, for nearly all quick and dirty tasks (where a short script is most likely) it usually doesn't matter. For everything else a different paradigm than the one Python3 picked would be better. (One where adding filters to a read file is OPTIONAL and they can be invoked on individual byte-strings as well.) https://stackoverflow.com/questions/6882301/what-is-the-best-utf#6884203 https://stackoverflow.com/questions/6882301/what-is-the-best...
- hackbinary 8y agoWhy bother? Because Python 2 is EOL in a little less than 2 years. The NHS chose not to upgrade to from Windows XP and 2003 and look where that got them last year: a massive crypto locker infection.
- rwmj 8y ago
- jake_the_third 8y agoSeeing that there was a vulnerability in python just a couple days ago, I'd consider getting security updates a benefit. Most people will stop running python 2 when malware targeting it becomes rampant. So people being able to run your code is another benefit. :o)
- shawnz 8y agoThe benefit is that you won't be stunting adoption of Python 3, which will help get us back to a homogeneous Python landscape more quickly.
- rdtsc 8y agoGreat point. Python 3 for many just wasn't a great carrot. That's why they didn't switch. For a while it was even slower. Also most importantly Python 2 wasn't that bad of a stick. It was just pretty darn good to begin with. And of course that it is still supported on some OS-s people will keep using.
- odonnellryan 8y agoYou don't have to learn Python 3, and there are plenty of cool features (ok well being cool isn't always enough reason but it is a reason) and there are libraries that are not supported on 2.x anymore. Also you don't have so much longer until support drops entirely for 2.x, and then you really should port your projects. Why wait and port? Just write them in 3. There is nothing wrong with 3. Just starting in 3 is easy and not an issue. It is basically the same language.
- carapace 8y agoThis. I've been trying to make this point myself but people don't seem to want to acknowledge it, so it's gratifying to hear someone else say it too. What if Python 3 was a separate project that someone other than GvR had put forward, would adoption have the same impetus? I don't think so.
- gaius 8y agomore often it is because of the perceived ubiquity of Python 2.7 installs on the target user's computer It’s not just “perceived”, it is actual reality e.g. on CentOS. If you need compatibility still the best option is 2, regardless.
- Wowfunhappy 8y ago^^ Python 2.7 is also available by default on macOS, whereas you have to go out of your way to install Python 3.
- ptx 8y agoIn RHEL 8, Python 3 is finally the default Python version: https://developers.redhat.com/blog/2018/11/14/python-in-rhel-8/ https://developers.redhat.com/blog/2018/11/14/python-in-rhel...
- fpoling 8y agoOn Redhat and compatible systems python 2 will be supported for at least 10 years.
- dijit 8y ago30th of June 2024 is not 10 years away. RHEL 7 will be the last RedHat with python2 by default and it goes end of life in 2024. Additionally; expecting them to properly support all the new features and manually creating (not backporting) fixes for issues is accrediting RedHat with having more resources than the reality allows.
- fpoling 8y agoEOL for RHEL 8 will be in 10 years and python2 in RHEL8 will be a fully supported package even if not installed by default. And I suspect that it is not only Redhat that will need to support python2 past 2020. For example, I guess Ubuntu 20.4 with EOL in 2025 will still have a package. So there will be upgrade and fixes for python2 just not from python.org.
- avian 8y ago> I'd love to know why this project specifically chose Python 2.7 too. My guess is they just went with whatever was most convenient and worked. I doubt if this kind of questions were even on the radar. It's security research, not a production website. In research you tend to go with whatever tool does the job. Look at the overall complexity of this work. Maybe the author simply felt more confident with Python 2. You take whatever shortcuts that make things simpler, even if it means using 20 year old software.
- j1elo 8y agoIt's not a huge obstacle, but it _is_ an obstacle. I'm not a Python programmer, but I can find my way around without much issue. Still, from where I'm sitting all that stuff about envs and the 2, 3 or 4 redundant, overriden, or deprecated mix of solutions sounds strange to me, I don't really want to buy into that just yet (I need Python like once per month, no more). For the casual programmer ("just want to change this line and run, please") it's just a block in the road that virtually all instructions you might see on any random README in Github might tell you to use "pip install..." but then you have to second guess if they mean "pip2" or "pip3", and whether they assume you'll be running with v2 or v3, maybe they tell you to run "pip install something" (which runs pip2), then in the script there is a Python 3 shebang... the installed dependency won't be found and now you have to understand all this mess if you want to continue. This is in Ubuntu, where the system's "python" is Python 2, and you need to explicitly add a "3" to all your commands if you want to run v3. I'm sure there are clever ways to solve the issue, but I bet they'll break some use case. I'd just rather none of this nonsense existed at all, then no funny workarounds would be needed. I wonder, how come other languages are able to slowly introduce some breaking changes over time (I'd swear Ruby was mentioned in some other HN thread about doing this) but not cause this kind of mess (as perceived from my humble external point of view)?
- dev_dull 8y agoIn other words, most likely because it’s the default python interpreter for this system.
- CamperBob2 8y agoWhy is this downvoted to goatse.cx territory? It's a perfectly reasonable question with no self-evident answer.
- kencausey 8y agoI didn't downvote it but it seems well off-topic to me.
- yjftsjthsd-h 8y agoIt's a question about an implementation detail. It's not the big headline news, but it is relevant.
- exikyut 8y agoNobody else answering this question seems to have read the article. > Like DAL, the OpenIPC library includes a command-line interface (CLI), written in Python and provided as a library for Python as part of Intel System Studio, which can be installed on the system with the help of pip. Intel System Studio doesn't ship its own python, it depends on the OS' python version. So here we have an industry-infra dependency on python, and these typically seem to still be stuck in 2.7 land. Python is being used here to actually wrap/coordinate the components that do the JTAG handshake. A neat approach, just using a whole programming language as the REPL. I like it. But this is one situation where I'm going to be very conservative with the tooling, as I don't want to break my system! :) So, that's the real reason why. Also; the repo actually has, right in view, a recent commit message of "fix for Python 3 compatibiliy". The authors are clearly just using 2.7 because ISS requires it and considering the bigger picture of tinkering with PoCs, mucking about with multiple Python versions seems like a waste of cycles and unnecessary management+verification of moving parts (I don't savor the idea of figuring out "ok how do I tell ISS where 2.7 is and how do I absolutely make sure it's avoiding 3.0?"). -- HN, please endeavor to pursue higher quality discussion. Devolving into meta is an excellent way to encourage stagnation. (I know this sounds a bit of a self-righteous thing to say but it's tricky to objectively articulate.)
- someguydave 8y agoAgreed. Nothing repels an actual hardware hacker harder than finding that the reaction to a significant finding consists mainly of bikesheding the python version of his concept script
- rasz 8y ago3 forces you to screw around with Unicode encoding/decoding everything, painful when dealing with raw bytes.
- marssaxman 8y agoThat's called "dealing with the reality of international text instead of burying your head in the sand," isn't it? Bytes are not text any more than bytes are a picture or bytes are a sound recording; it is only in the context of an encoding that bytes can be interpreted as something more. For that matter, given the inexplicable popularity of emojis, it isn't even a matter of international text anymore.
- rasz 8y ago"dealing with raw bytes" = processing raw binary data (firmware dump, binary network protocols etc), not complete works of Shakespeare translated to 10 languages. So yes, go ahead with 3 if you are into emoji.
- therein 8y agoThat was a fun read. Interesting trick with the debug USB cable with some of the pins isolated.
- rzzzt 8y agoI don't quite get how it works. A quick search tells me that USB 3.0 indeed allows A-A crossover cables to connect two hosts: https://superuser.com/a/945523 https://superuser.com/a/945523 ...but this leaves only a single conductor to do the entire thing?
- AnssiH 8y agoA USB3 A connector has 9 pins, not 4 like USB2, so there are still 6 left.
- snops 8y agoAnd those 6 pins are separate TX and RX pairs, and 2 grounds. The pins disconnected are 5V, which would potentially damage things or cause an overcurrent flag to trip (turning off both ports) if this was connected on both ends, and D+/D-, which is the bidirectional USB2.0 data pair that normally has fixed host/device roles and needs a special controller (like the one in your phone) to be dual role, so it's easier to just disconnect it. The USB3.0 TX/RX pairs are only one way each (think like RS232 null modem but much faster), so it's much easier. This is a good example of how USB3.0 works almost like a separate, parallel bus to USB2.0.
- tyingq 8y agoThe picture is somewhat misleading, as you can only see the 4 connectors in the front. The other 5 are out of view. https://www.stemmer-imaging.com/media/cache/gallery_preview_505/uploads/acquisition/sis/gl/glossary-USB3-2-en.JPG https://www.stemmer-imaging.com/media/cache/gallery_preview_...
- superkuh 8y agoThere's the other side plus the shield itself is a pin. It's the ground.
- tempodox 8y agoSo do we finally have reliable backdoors into any and all chips?
- pingec 8y agoDoes this help with reversing the intel ME and/or figurring out how to disable to potential spyware parts of it?
- 1996 8y agoTremendously. It is a huge first step. I worked on BIOS stuff before. I decided to wait until AMT was more exploitable to come back to the scene. This is big news. It should be #1 on HN, instead of the failed pentest story. Right now I am ordering a GB-BPCE-3350C to replicate their work and see how to extend it to other platforms. Intel will limit the vulnerability. No time to wait. A modern AMT free laptop would be of great value.
- Sephr 8y agoThis isn't as highly upvoted because it's old news from two months ago. I remember this being very well received when it was first published on Twitter.
- 1996 8y agoI should have followed more closely. I get most news here now.
- craftyguy 8y agoConsider multiple news sources. Getting info only from HN must leave you with a feeling of 'Facebook rules the world, blockchain all the things, ICO or GTFO, apps are only written in Go or Rust, Tesla Tesla Tesla'
- codedokode 8y agoWhy does Intel encrypt the code? It is unlikely that anyone would steal it because it is useable only with Intel CPUs and is protected with copyright. So the reasons are either Intel wants to hide something (a code that changes CPU behaviour when a benchmark is detected?) or wants to have some features that cannot be disabled or modified by the user. It is difficult to believe that there is no backdoor.
- int0x80 8y agoThat an also to avoid posibly revealing internals and details of the designs/architecture/etc to non-intel people.
- monocasa 8y agoSecurity by obscurity obviously shouldn't be your only method, but it can absolutely be a valid component of a broad defense in depth.
- fromthestart 8y agoI don't know if I agree. While obscurity can be a deterrent, I imagine most groups are unlikely to come up with sufficient, convoluted complexity to prevent identification of exploits. Primarily because you're effectively pitting yourself against a collective of $hat hackers, instead of doing things "right" and attempting to use encryption. This doesn't mean it isn't a deterrent, but doing things in an obfuscated and unusual way also means you're potentially treading on unexplored ground, and so there will potentially be other exploits, bugs, innefficiencies which can come with the territory.
- monocasa 8y agoThis isn't an "instead of doing things 'right'". Like I said, it's only valid as one component of a broader strategy. You might have a point if someone had ever made a perfect scheme, but everything that seems to have attracted attention has been broken AFAICT. So, a moat around a castle does help. Calling it good after digging a moat and not building any walls is probably less useful than doing nothing. The moat is only useful in the broader context.
- zzo38computer 8y agoCan we disable Management Engine entirely in order to don't waste energy, in addition to not having stuff that you don't know so that it will not run all of the stuff you do not need.
- FlyMoreRockets 8y agoLast I checked, there was no way to disable ME.
- bubblethink 8y agoOnly partially for new machines. For pre-Nehalem ones, you can disable it fully. You may be interested in this: https://github.com/corna/me_cleaner https://github.com/corna/me_cleaner