IoT Security: Cases and Methods
-
Upload
leonardo-de-moura-rocha-lima -
Category
Technology
-
view
195 -
download
10
Transcript of IoT Security: Cases and Methods
Copyright ©2016, @leomrlima
Detro
itJUG
IoT Security: Cases and Methods
Leonardo Lima@leomrlima http://v2com.mobi
Copyright ©2016, @leomrlima
Detro
itJUG
About meLeonardo Lima
•Computer engineer, server & embedded SW developer•From São Paulo, Brasil, now in Austin, TX•CTO at
•Spec Lead – JSR363•V2COM’s Representative at JCP Executive Committee
[www.linkedin.com/in/leomrlima]
Copyright ©2016, @leomrlima
Detro
itJUG
INTERMISSION! THE JAVA COMMUNITY PROCESS
Copyright ©2016, @leomrlima
Detro
itJUG
What’s the JCP and why should I care?
It’s the way to make Java a healthy, multi-vendor environment
What happens here impacts on your job
YOU can be part of the change you want for the platform
It’s easy for YOU to join and start: just fill a webform!
Copyright ©2016, @leomrlima
Detro
itJUG
But… how do I join?1. Go to jcp.org2. Register to use the site
(there’s a button on the left side menu)
3. Use the ”get involved section”
4. Remember to vote on the EC election if you join until tomorrow!
Copyright ©2016, @leomrlima
Detro
itJUG
ASPECTS OF IOT SECURITY
Copyright ©2016, @leomrlima
Detro
itJUG
On connecting thingsThe buzz of IoT is connecting things
Does everything needs to be connected?
The implications of connectivity
Copyright ©2016, @leomrlima
Detro
itJUG
In a study…Attacks on Internet of Things devices will increase rapidly
due to hypergrowth in the number of connected objects, poor security hygiene, and the high value of data on IoT devices.
Copyright ©2016, @leomrlima
Detro
itJUG
RECENT ATTACKS AND EXPOSURES
Copyright ©2016, @leomrlima
Detro
itJUG
Cameras“Every camera [out of 9 models] had one hidden account that a
consumer can’t change because it’s hard coded or not easily accessible. Whether intended for admin or support, it gives an outsider backdoor access to the camera.”
Copyright ©2016, @leomrlima
Detro
itJUG
Barbies”On the service side, ToyTalk’s server domain was susceptible to a
known SSL encryption flaw called POODLE, which could allow attackers to steal communications and other data. A credentialing issue could also let attackers probe for further vulnerabilities.”
Copyright ©2016, @leomrlima
Detro
itJUG
CarsAs the two hackers remotely toyed with the
air-conditioning, radio, and windshield wipers, I mentally congratulated myself on my courage under pressure. That’s when they cut the transmission.
Immediately my accelerator stopped working. As I frantically pressed the pedal and watched the RPMs climb, the Jeep lost half its speed, then slowed to a crawl. This occurred just as I reached a long overpass, with no shoulder to offer an escape. The experiment had ceased to be fun.
Copyright ©2016, @leomrlima
Detro
itJUG
Electrical gridHe watched as [the mouse] navigated
purposefully toward buttons controlling the circuit breakers at a substation in the region and then clicked on a box to open the breakers and take the substation offline. A dialogue window popped up on screen asking to confirm the action, and the operator stared dumbfounded as the cursor glided to the box and clicked to affirm. Somewhere in a region outside the city he knew that thousands of residents had just lost their lights and heaters.
Copyright ©2016, @leomrlima
Detro
itJUG
Zombie IoT army!Massive DDoS attack – 10s of millions –
in DNS infrastructure (from Dyn) last Friday (October 21, 2016)
Mirai botnet was created exploiting the vulnerabilities just described (default passwords)
The code for ”recruiting” devices was open-sourced, so anyone can take a swing
Copyright ©2016, @leomrlima
Detro
itJUG
Zombie IoT army – The attack
Copyright ©2016, @leomrlima
Detro
itJUG
Zombie IoT army - the virusMirai’s attack function enables it to
launch HTTP floods and various network (OSI layer 3-4) DDoS attacks.
For network layer assaults, Mirai is capable of launching GRE IP and GRE ETH floods, as well as SYN and ACK floods, STOMP (Simple Text Oriented Message Protocol) floods, DNS floods and UDP flood attacks.
Mirai uses a brute force technique for guessing passwords a.k.a. dictionary attacks based on the following list
Another interesting thing about Mirai is its “territorial” nature. The malware holds several killer scripts meant to eradicate other worms and Trojans, as well as prohibiting remote connection attempts of the hijacked device.
Copyright ©2016, @leomrlima
Detro
itJUG
Zombie IoT army - the cure1. Stop using default/generic passwords.
2. Disable all remote (WAN) access to your devices. To verify that your device is not open to remote access, you can scan the following ports: SSH (22), Telnet (23) and HTTP/HTTPS (80/443).
Copyright ©2016, @leomrlima
Detro
itJUG
IoT SecurityThe Industrial Internet of Things Volume G4: Security Framework
Many different aspects, like IT/OT convergence
Copyright ©2016, @leomrlima
Detro
itJUG
IoT Security is ”messy”…
Copyright ©2016, @leomrlima
Detro
itJUG
Security, Trust & Privacy • Endpoint security
• Communication security between the endpoints
• Data distribution and secure storage
• Management and monitoring security of both the endpoints and the communication mechanism
Copyright ©2016, @leomrlima
Detro
itJUG
”Broad security”• Trust – data is coming from known device
• Integrity – data was not tampered with since it was sent from the device
• Uniqueness – data is not being ”reused”
• Privacy – data is not being used by unauthorized parties
Copyright ©2016, @leomrlima
Detro
itJUG
Security X Easiness X Cost• These 3 variables can’t be maximized at the same
time – if you want to maximize one or two, the third will be minimized
• Many of the attacks mentioned before happened because of ”wrong” maximization.
• Security aspects have to be thought since the beginning – adding security later adds more cost and less security
Copyright ©2016, @leomrlima
Detro
itJUG
USING JAVA FOR A (MORE) SECURE IOT
Copyright ©2016, @leomrlima
Detro
itJUG
Java Security GuidelinesSecure Coding Guidelines for Java SE helps with the most
effective approach to minimizing vulnerabilities is to have obviously no flaws rather than no obvious flaws
Java Coding Guidelines from CERT is also a good resource to understand how to program more securely
There’s a page from Oracle that covers many aspects of security, such as platform security, cryptography and secure communications
Copyright ©2016, @leomrlima
Detro
itJUG
Java Cryptography ArchitectureProvides Cryptography pluggable
support for many different providers and capacities.
Supports standards like PKCS#11, TLS and many others
Standard implementations in Java SE VMs
https://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html
Copyright ©2016, @leomrlima
Detro
itJUG
JCA Related LibrariesOracle’s JVM already includes an implementation that can help
you get started with security
The Legion of Bouncy Castle, aka, https://www.bouncycastle.org/, has many algorithms for JCA and related, such as X.509 certificates, OpenPGP and Lightweight APIs for TLS and DTLS (RFC 4347)
Security hardware vendors also provide providers for JCA, so you can leverage different levels of security with no change in code
Copyright ©2016, @leomrlima
Detro
itJUG
Example of software only encryption
Public/Private Key Infrastructure + Symmetric Shared Secret
Fragility: your keys are still ”hackable”, as they’re in non-protected memory!
Copyright ©2016, @leomrlima
Detro
itJUG
Secure ElementProvides a safe place to execute sensitive code
and store hardware identity and private keys
Hardware protection to prevent tampering
Many form factors
Copyright ©2016, @leomrlima
Detro
itJUG
Secure Element// Create a PKCS#11 cryptographic provider which uses the Secure Element Provider myPKCS11Provider = new sun.security.pkcs11.SunPKCS11(PKCS11_CONFIG);
// The PIN code protecting the Security Element char [] myPIN = {'0','0','0','0'};
// Create a KeyStore corresponding to the Secure Element KeyStore.PasswordProtection pinProtection = new KeyStore.PasswordProtection(myPIN);
KeyStore.Builder ksb = KeyStore.Builder.newInstance("PKCS11", myPKCS11Provider, pinProtection);
KeyStore ks = ksb.getKeyStore();
// Add the SE as a cryptographic provider Security.addProvider(myPKCS11Provider);
Copyright ©2016, @leomrlima
Detro
itJUG
Secure Element// We sign with ECDSA Signature ecSign = Signature.getInstance("SHA256withECDSA");
// Retrieve the signature key in keystore by it’s alias PrivateKey privKey = (PrivateKey) ks.getKey("SignKey", myPassword);
// And we sign ! ecSign.initSign(privKey); ecSign.update(s1.getBytes());byte[] signature = ecSignCard.sign();
Copyright ©2016, @leomrlima
Detro
itJUG
JavaCardMini-Java for Secure Elements and Trusted Execution Environments
Led by the JavaCard forum (it’s not JCP related)
Copyright ©2016, @leomrlima
Detro
itJUG
Summary• Security is an ever increasing concern
• Security has to be thought from the start of a project
• You can be as secure as you want
• Java has lot of infrastructure for secure IoT devices
Copyright ©2016, @leomrlima
Detro
itJUG
Q & A
Copyright ©2016, @leomrlima
Detro
itJUG
Thanks!