Security Best Practices: From IoT to HIPAA

A couple weeks ago, Kevin Gross posted about the myth of a hacker-proof IoT. His post gave a great high-level overview of ways to make the IoT as secure as possible, and it got me thinking about some more in-depth methods for attempting to attain the security we crave in the IoT industry, especially where regulations like the Health Insurance Portability and Accountability Act (HIPAA) are concerned.

There is a set of best practices that most IoT and software companies and products typically use, and they tend to be enforced via two mechanisms: cryptography and access control. Cryptography governs the state of data in any medium, and access control, in general, exposes access. This can mean access to existing resources, to the public key used for decryption, to account management, and to data at rest.

When establishing the connected device engineering requirements, implementing cryptography and access control needs to be taken into consideration for every piece of equipment connected to a network. I want to try to break it down a little bit here.

Cryptography

stethoscope on keyboard pic

Data in motion should be always-(be)-encrypted (AE). Data at rest does not require constant encryption unless it is predicated by government rules and regulations, for example, HIPAA regulations for protecting health care information, which we will talk more about later. Let’s start by looking at some ways that data in motion can be ensured to be AE.Client-Server Communication

Production traffic between clients and servers should always, without fail, contain only encrypted information. The only time that unencrypted HTTP should be used is during development or QA. Any production system should use HTTPS instead of HTTP.

Production systems should always use signed certificates with HTTPS. HTTP should be permissible for local, development, and QA traffic only. Websocket connections should also only be established over HTTPS.

SSH Tunneling

Developers who use a native socket should investigate using SSH tunneling in order to encrypt port traffic. This is one of the easiest ways to get solid and secure socket traffic and protects you from any need to roll your own.

Native Sockets

Public-key cryptography should be used with all native socket connections between network-connected machines. The only time that unencrypted socket traffic should be permissible in development practice is port-to-port on same machine. This is the most difficult hole to enforce, and the most likely area to leak sensitive information against a dedicated attacker. IoT devices in particular are in danger to this kind of security hole.

Email

Email is not encrypted, folks! Sensitive information should never be transmitted via email, unless you and the recipient are practiced in PGP or other kinds of email encryption. Different providers implement different levels of security around email. Gmail now provides HIPAA compliance for email. Even that HIPAA guarantee can only be made for services within Google, exclusively. If you email a patient at random-email-server.com, HIPAA security has been compromised. This is why it is illegal for any electronic patient health information (ePHI) to be transmitted via email.

Access Control

Access Control usually governs how we gain access to the administrative tools that track, deploy, and maintain our various software and hardware systems. Server shells, database instances, logging sites, key management, web hosting, and many more are primarily affected by how we implement secure access control. Any system with production-level access that supports multi-factor authentication should enable it. Any system that supports public-key cryptography for access control should use that method exclusively (SSH, some databases).

IoT devices, in particular, should try to use public-key cryptography for all access control — don’t rely on usernames and passwords, because eventually a module with root access will get leaked. If your device was designed to be administered via telnet, place the telnet port behind an OS firewall and provide access to it via SSH.

HIPAA Requirements

HIPAA regulations in my experience generally govern cryptography requirements. Access control isn’t nationally standardized but is always improving. Because we have worked on some health care-based applications and products here at Cardinal Peak, we are well-versed on how to maintain HIPAA compliance.

HIPAA compliance means that no user-specific data is visible in our network traffic, logs, or communications (email). User-specific data includes email addresses, names, dates of birth, SSN, address, insurance information, and diagnostic information. These types of information should never appear in clear text in unsecured logs or emails. Communication about specific accounts generally must use a user ID or account ID, which is not considered ePHI.

HIPAA compliance also requires transparency and accountability toward potential errors. It is highly likely that during development, ePHI can be leaked on an insecure channel. Each suspected leak of ePHI, regardless of whether it was accessed by unauthorized parties, must be reported to HIPAA. Failure to report insecure ePHI data can result in hefty fines.

Following these guidelines is imperative for any company or individual working with patient health information, as it is always governed under the HIPAA regulations.

Don’t Roll Your Own

It has been said before, keep saying it. If you can’t use HTTPS, look closely into SSH tunneling. It offers unprecedented security for any network traffic.

Conclusion

Your IoT business needs to have a security standards document that specifies what technologies should or must be used to secure network-connected devices. This document should detail requirements for both access control and cryptography. New developers should review the security standards document and be expected to adhere to it. Your company’s survival depends on it. The basic requirement for any network programming is that you should not be transmitting production data that is not encrypted, at any time.