Securing embedded systems (for share)

1,847 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,847
On SlideShare
0
From Embeds
0
Number of Embeds
21
Actions
Shares
0
Downloads
60
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • I will be talking about the security of embedded systems Many of the areas will still be of interest to those more interested in PC based systems I know that although I think that this stuff is facinating, some people can find it a bit boring, so I will try to make it as fun as I can, and to that end I shall occasionally share my presentation with monsters, gnomes, and some gorillas … With that in mind I will provide some theme music for the first question of the topic to see where I should pitch the rest of the talk …
  • Of course, in 30 minutes or so I can’t go through everything on embedded security, so I have whittled down the presentation to these core topics
  • Requirements for product security is becoming the norm, not the exception Your devices are used to secure your information, as well as to protect other peoples information from you! Also protect business cases …
  • Perhaps “Better Equipped” is not quite the right term …
  • During the presentation I will be providing real world examples from this system, which we have produced in parts specifically for this presentation Plugs into your PC, and provides security for your GPG / PGP use MUCH more secure than just using GPG on your PC … or is it? Let’s test it to see what vulnerabilities it may have …
  • RSA is basically just plaintext (to the power of) your key (modulo) some key related number The ‘to the power of’ bit, is exponentiation, and most often calculated using an algorithm called ‘square and multiply’ I won’t go into the details of the math, as interesting as that is, but rest assured that it means that processing takes longer for each key bit which is a ‘1’ rather than a ‘0’ Timing attacks can also impact on any compare operations in the device (where the input is compared to a calculated or pre-stored value within the device)memcmp() is generally optimised to return as quickly as possible, which means that it will return quicker for an incorrect input, than for one that is correct But don’t take my word for it … let’s test it!
  • In our test system, memcmp() is used for both passwords (to allow for signing and decryption), and for HMACs (which are used to authenticate software updates) Hooked a CRO up to the output line of our system So when we get the first byte incorrect, the memcmp() returns a this point in time When we get the first byte correct, the time to return increases (by approx 0.5us on this system) Next byte correct, we get a return later again So, by working through all 256 values of each byte, we can brute force an 8 byte password in 2048 tries rather than 18.5 million trillion- So easy, let’s have cookie monster explain as we work through the remaining 6 bytes …
  • Blinding / masking involves changing the input data (plaintext) or key (exponent) during the operation, in such a way the changes can be removed at the end of the calculation to restore the correct ciphertext value Be sure when you are implementing blinding for RSA you are aware of why you are doing it – blinding only the data will protect against side channel analysis Create your own data independent compare procedure First rule of the day – test it, don’t assume
  • Many programmers don’t spend a lot of time thinking about the physical processes which make their programs work Fine most of the time, but this is a problem when it comes to security When I say lots, I mean thousands, millions, even billions Power analysis was first recorded in some recently declassified US government documents, which noted that the russians had installed current monitoring devices into US encrypting typewriters When your system does the same operations, it draws exactly the same current, and emits exactly the same radiation. When processing changes, so does the current draw and emissions Therefore by monitoring the current or EM, you can determine what the device is doing!
  • So, the selection function is absolutely vital It’s a way to differentiate between the many captures of power or EM you have, so that they can be correlated using statistical methods EG; The selection function could be a way to separate the data based on what would happen to a single bit of the input plaintext based on all possible values of only four bits of the key So, once you have a selection function, you separate the captures base on the chosen selection function, and apply your statistical model If you have a good selection function, one of the ways in which you have separated the captures is exactly correct, and will (hopefully) produce a correlation in your statistcal analysis For the other ways in which you have separated the captures, your model is incorrect, and therefore you will not get any correlation Many different selection functions exist, for different algorithms and methods of processing. Be aware that selection functions are not limited to cryptographic algorithms – don’t close the door just to have the attackers come in the window
  • So, enough talking, lets have an example Here we have a capture of the power waveform of AES processing on the GEEK hardware If we take some more samples, say 20, and process it through our selection function, we get the following output You can see that there is a lot of noise here which is caused by the 256 different outputs overlaid on each other, each representing a potential sub-value of the AES key. However, at this stage, there is no real outlying signal which has been correlated As we apply more and more captures to the statistical analysis, we increase the signal for the correct value, and decrease the noise caused by 255 other incorrect values [At 40 captures] Now we are starting to see some information peeking out of the noise floor, and I want to you keep an eye on [Click] this point as we increase the number of captures we are analysing, as we can already see a point which has started coming up out of the noise … [Click - It’s coming up] So, this peak tells us, through our analysis, and part of the AES key for this device is 11 hex. To reveal the whole key, we just have to repeat this process, using the same captures, focusing on different parts of the key. So, with a current probe and some software, we have broken the 128 bit AES encryption of this device after observing only 100 operations. [Click - Accurate timing]
  • Some vulnerabilities require the attacker to have physical access, some do notEven without physical access, an attacker could use malware to brute force password and use the token to sign / decrypt documents The GEEK is better than general purpose GPG on a PC, but it is not 100% secure What happens when these vulnerabilities are exposed, by hackers or academics? Can all of these problems be patched with software updates? What about the external memory? Is this an issue? What legals do you have around guarenteed performance of this device?
  • You need to understand what the threat model of your clients is – this may be as easy as looking at published standards (such as FIPS140-2, or PCI PTS), or it may be more difficult Be aware of the potential issues and make sure you have the resources to test for them Understand the potential impact if you are sacrificing testing for reduced initial development cost and quicker time to market – could this end up costing you more in the long term?If you have spent the time to outline security requirements from the outset, make sure the system meets these before release, many well designed products have failed through lack of ensuring they met their own specs Nothing is perfect, always have a plan B Don’t forget security once the product is released – ongoing maintenance may be required to prevent catastrophic failure (eg non-random K values in DSA signature)
  • Securing embedded systems (for share)

    1. 1. Close the Door!Securing Embedded Systemsv1.1<br />Witham Laboratories<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 1<br />
    2. 2. Agenda<br />Why Embedded Security Matters<br />(Theoretical) Example System<br />Timing Analysis<br />Power and EM Analysis<br />Encryption and Key Management<br />Software Update Security<br />Glitch Attacks<br />Summary and Best Practice<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 2<br />
    3. 3. Embedded Security Matters<br />Processors are everywhere<br />Often used to secure your information<br />Form the foundation of business cases<br />Payment, games, mobile phones, TV/video<br />Required to maintain essential assets<br />Crypto keys, passwords, firmware/code<br />Drive economies (see above!)<br />Phones, consoles, pay TV HW; sold at loss<br />Profits come from content and lock-in<br />Let’s talk economics for a second <br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 3<br />
    4. 4. Embedded Security Matters<br />Systems development cost increasing<br />More people, more equipment, more complexity, more requirements<br />How much does a dev resource cost you?<br />Hackers have the economic advantage<br />Costs more to build than to break<br />Time on market >> time to market<br />Attacks only ever get cheaper / easier<br />Financial gain often not the motivation<br />Hackers share info, businesses do not<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 4<br />
    5. 5. Embedded Security Matters<br />Usually safe to assume hackers are:<br />Better equipped<br />More knowledgeable<br />With greater motivation and resources<br />Time to give up?<br />Time to invest in security design<br />1st step: Understanding the vulnerabilities<br />We’ve got an example system to hack <br /> ———————More resourceful<br />No!<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 5<br />
    6. 6. (Theoretical) Example System<br />GPG Embedded Encryption Key (‘GEEK’)<br />HW token with support for TDES, AES, RSA <br />256k flash for code storage, 8GB flash for document storage (both AES encrypted)<br />Verifies your GPG password/passphrase<br />Keys stored and operated on device<br />Firmware can be updated in the field<br />Secure system uses HMACs for auth<br />Marketed to industry and governments<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 6<br />
    7. 7. Timing Analysis<br />Timing of RSA modulo exp operations<br />RSA most often uses ‘square and multiply’<br />Processing of a ‘1’ bit in the key requires more steps than processing a ‘0’ bit<br />Therefore takes longer<br />‘Final reduction’ step will also leak information<br />Password / (H)MAC verification<br />Data dependant timing for compare<br />Allows for ‘walking’ through correct values<br />Correct guesses take longer to return than incorrect guesses<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 7<br />
    8. 8. Timing Analysis - Eg<br />Access password and HMAC<br />Compared using standard memcmp()<br />Work through all values of first byte<br />Time to error > when first byte correct<br />Once known, repeat for other bytes<br />8 byte password in 256 x 8 rather than 256^8<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 8<br />
    9. 9. Timing Analysis – Close the Door!<br />Blinding of RSA operations<br />Changes the actual values processed<br />Therefore information gained through timing is not correlated to the data / key<br />Data independent compare operations<br />Ensure run time is same for all inputs<br />Best implementation can depend on your processor / compiler … but try;<br />XOR or bytewise compare across all bytes<br />AND / OR results together to form return value<br /> AND TEST IT!!!<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 9<br />
    10. 10. Power and EM Analysis<br />Every transistor is doing you damage …<br />Embedded devices = lots of transistors<br />Draw more current when switching states<br />Transmitting data, performing computations<br />Processing is deterministic & repeatable<br />Each device & operation has a unique power / EM ‘signature’<br />Different when any processed bits are different<br />Encryption processing depends on data & key<br />Therefore, emissions leak secret info!<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 10<br />
    11. 11. Power and EM Analysis<br />Selection function is vital<br />Method to differentiate captures based on a finite number of possible secret values<br />Eg Value of 1 bit based on part of key<br />Work through all possible secret values<br />Apply statistic analysis to the datasets<br />Eg separate into captures where bit=1 or bit=0<br />Incorrect assumptions = no correlation<br />Correct assumptions = correlation<br />Decreased noise, increased signal<br />Selection fns exist for AES,DES,RSA,ECC, …<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 11<br />
    12. 12. Power and EM Analysis - Eg<br />GEEK AES power analysis<br />Depends on accurate timing alignment<br />Frequency domain or Integration analysis can compensate for poor alignment<br />Still have to know roughly where crypto is<br />AES Subkey = 0x11<br />- 100 samples<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 12<br />
    13. 13. Power and EM Analysis – Close the Door!<br />Random delays or round structure<br />Frequency / windowed analysis may work<br />Blinding or masking<br />Requires higher order analysis<br />Time / function limits on crypto<br />Depends on level of side channel leakage<br />Design to minimise use of secret data<br />Unique key per operation<br />Key management!!<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 13<br />
    14. 14. Encryption & Key Management<br />Epic fail for many systems<br />Use bad (non-standard) crypto algorithms<br />Use good (standard) algorithms badly<br />Good design, poor management<br />One key to rule them all!<br />(and in the darkness bind them)<br />The algorithms are the easy part<br />RSA, ECC, TDES, AES<br />Don’t think proprietary / secret is better!<br />The key is the secret!<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />, Serpent<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 14<br />
    15. 15. Encryption - Eg<br />GPG password in external flash memory<br />Encrypted with AES ECB<br />Location of password can be determined<br />Lots of other blocks have same value<br />Probably 0x00 or 0xFF before encryption (depends)<br />Swap with password location -> password now known!<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />0x696275c0eb3d6e6b8ceabaea4e279589<br />0xc2ff88de46aa82335d0182dc597e413e<br />0x19537682cfc5f228881c91712d0ac051<br />…<br />0x0da873169c2ee2d80a706eabeab638da<br />0x0da873169c2ee2d80a706eabeab638da<br />0x0da873169c2ee2d80a706eabeab638da<br />…<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 15<br />
    16. 16. Encryption – Eg<br />(8GB)<br />Encryption key ‘hidden’ in flash<br />Cannot be visually / statistically differentiated from encrypted memory<br />Location is random for each device<br />Key location can be easily brute-forced<br />8 x 1024 x 1024 x 1024 = 8,589,934,592<br />Run through all possible 32 byte key values<br />Decrypt known plaintext (eg unused flash)<br />1us per AES operation = all keys tried in ~ 8590 seconds (less than 2 ½ hours)<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 16<br />
    17. 17. Encryption – Close the Door!<br />Use your algorithms wisely<br />Approved modes of operation (ISO, NIST)<br />Industry standard padding (PKCS)<br />Understand limitations to the algorithm / mode of operation<br />Encryption ≠ authentication (usually) <br />Beware dictionary / frequency analysis<br />Beware transposition of encrypted data<br />Understand your need for encryption<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 17<br />
    18. 18. Encryption – Close the Door!<br />Use suitable mode of operation<br />Beware ECB or stream cipher modes (where contents change / may be known)<br />Unique key per device, and per use<br />Don’t use memory encryption key for encrypting system secrets<br />Beware cryptographic errors<br />May indicate an attack (see glitching!)<br />Protect key storage<br />Obfuscation at a minimum<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 18<br />
    19. 19. Glitching<br />Every transistor is doing you damage …<br />Each instruction switches many transistors<br />Usually all synchronised with a ‘clock’<br />No two transistors are the same<br />Different locations, tolerances, I/O factors<br />A glitch forces some transistors to (not)operate when they shouldn’t<br />Can be applied many different ways<br />Power, clock signal, EM, light<br />Changes operation of only a few transistors<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 19<br />
    20. 20. Glitching - Eg<br />HMAC fails, system sits in tight loop<br />Code executed on ‘good’ HMAC follows the machine code for the loop<br />If(HMACisOK(image))!=1)<br /> {while(1)};<br />ExecuteNewlyDownloadedCode();<br />Glitch the clock, power, EM<br />Some transistors don’t work properly<br />Jump in test/while fails, or PC increments<br />Hello ‘ExecuteNewlyDownloadedCode()’ !<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 20<br />
    21. 21. Glitching – Close the Door!<br />Check for function entry before exit<br />Confirm crypto OK before output<br />Eg perform twice, or encrypt then decrypt<br />Use watchdog(s)<br />Beware frequent watchdog activation<br />Remember glitching produces ‘impossible’ processor operations!<br />Code for errors which cannot happen<br />Beware compiler optimisation<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 21<br />
    22. 22. Software Updates<br />Most systems will accept SW updates<br />Remote and/or local, part replacement<br />Avoid common authentication secrets<br />Remember encryption ≠ authentication<br />Be aware of local interfaces<br />JTAG, ICE, ROM bootloader<br />Disabled by SW, but maybe re-enabled …<br />Ensure what you authenticate is what you execute!<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 22<br />
    23. 23. Software Updates - Eg<br />Software written to flash before auth<br />Code only executed if auth passes<br />Unauth’d code stays in flash<br />Execute through glitch, code exploit<br />Software auth’d with RSA signature<br />Bug in ASN.1 parsing allows stack overflow<br />Expected as ASCII, uses strcmp() rather than memcmp(), terminates at nulls<br />System wide symmetric key for auth<br />Key exposed on one device …<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 23<br />
    24. 24. Software Updates – Close the Door!<br />Authenticate what you want to execute<br />Execute what you authenticate<br />What prevents changes after auth?<br />Beware parsing functions<br />Do you authenticate before or after?<br />What are the impacts of both options?<br />Does the parse change / remove any data?<br />Can the parse be exploited / compromised?<br />Overflow / null exit / assumed data positions, etc<br />Avoid system wide secrets<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 24<br />
    25. 25. Theoretical Example Summary<br />Many different vulnerabilities<br />External flash exploitable even with AES<br />Password checking could be bypassed<br />Keys exposed through side channels<br />Software update function insecure<br />Is that important? <br />Home user ≠ industry ≠ government<br />Still more secure than encrypting on a PC<br />What are your threat profile / compliance reqs?<br />What’s the fix: Patch? Product recall?<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Depends …<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 25<br />
    26. 26. Summary<br />Understand your risk and threat profile<br />Depends on the market and product<br />Build testing into your time/cost budget<br />Greater threat -> greater dev time/cost<br />Ensure product meets the security specs<br />No implementation is perfect<br />Plan for ifwhen vulnerabilities are found<br />Remember product life-cycle security<br />Key management, code signing, etc<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 26<br />
    27. 27. Questions?<br />For further information please contact<br />Andrew Jamieson<br />Technical Manager<br />Witham Laboratories<br />Email: andrew.jamieson@withamlabs.com<br />Phone: +61 3 9846 2751<br />Witham Laboratories<br />1/842 High Street<br />East Kew 3102<br />Melbourne<br />Australia<br />Ph: +61 3 9846 2751<br />Fax: +61 3 9857 0350<br />Rambla de Catalunya<br />38, 8 planta<br />08007 Barcelona<br />Spain<br />Ph: +34 93 184 27 88<br />Email: lab@withamlabs.com<br />PCI PTS PCI PIN PCI DSS PA-DSS<br />Witham Laboratories<br />Building Confidence in Payment Systems<br />Slide No. 27<br />

    ×