The Secure Login example demonstrates use of the Information Obscurity pattern. This example demonstrates the capability to transmit critical system information through an untrusted environment.
Example architecture
The untrusted environment in this example is a web server that serves requests from users of an IoT device. Practical experience has shown that this kind of web server is easy to detect and frequently attacked successfully because IoT devices do not have built-in tools for protection against intrusion and other attacks. Obviously, encryption algorithms must be used in this type of untrusted environment to protect data from being compromised.
In terms of the architecture in these systems, the following objects can be distinguished:
To employ cryptographic protection, the following steps must be completed:
Naturally, information protected in this way cannot be compromised at the point of communication.
The Secure Login example contains two entities:
localhost:1106
.The user authentication process occurs as follows:
localhost:1106
in their web browser.index.html
page containing an authentication prompt.auth.html
page containing the user name and password input form, and the public encryption key.auth.html
page containing the user name and password input form.auth.html
page is executed on the browser side and encrypts data using the XOR
cipher.result_err.html
page or the result_ok.html
page depending on the authentication result.This way, confidential data is transmitted only in encrypted form through the web server. Data transfer occurs through IPC interactions controlled by the Kaspersky Security Module.
Building the example
The example is built using the CMake
build system that is included in KasperskyOS Community Edition.
Files containing the code of the example and build scripts are available at the following path:
/opt/KasperskyOS-Community-Edition-<version>/examples/secure_login
To build and run the example, run the following script:
/opt/KasperskyOS-Community-Edition-<version>/examples/secure_login/cross-build.sh