Challenge - 5 Problems
IoT Security Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Output of a simple IoT device authentication simulation
Consider this Python code simulating a Raspberry Pi IoT device checking a password before allowing access. What is the output when the password is 'secure123'?
Raspberry Pi
def authenticate(password): if password == 'secure123': return 'Access granted' else: return 'Access denied' print(authenticate('secure123'))
Attempts:
2 left
💡 Hint
Check the condition comparing the password string.
✗ Incorrect
The function compares the input password to the string 'secure123'. Since they match, it returns 'Access granted'.
🧠 Conceptual
intermediate1:30remaining
Why encrypt data on IoT devices?
Why is encrypting data important for deployed IoT devices?
Attempts:
2 left
💡 Hint
Think about protecting information from hackers.
✗ Incorrect
Encryption changes data into a secret code so only authorized users can read it, protecting privacy and security.
🔧 Debug
advanced2:30remaining
Identify the error in this IoT device firmware update code
This code snippet is meant to check if a firmware update is valid by comparing version numbers. What error will it cause?
Raspberry Pi
current_version = '1.2.3' new_version = '1.3.0' if new_version > current_version: print('Update available') else: print('No update')
Attempts:
2 left
💡 Hint
Check the syntax of the if-else statement.
✗ Incorrect
The else statement is missing a colon (:), causing a SyntaxError.
🚀 Application
advanced3:00remaining
Result of running this Raspberry Pi sensor data encryption code
What will be the output of this code that encrypts sensor data using a simple Caesar cipher with shift 3?
Raspberry Pi
def caesar_encrypt(text, shift): result = '' for char in text: if char.isalpha(): base = ord('a') if char.islower() else ord('A') result += chr((ord(char) - base + shift) % 26 + base) else: result += char return result sensor_data = 'Temp: 25C' encrypted = caesar_encrypt(sensor_data, 3) print(encrypted)
Attempts:
2 left
💡 Hint
Look at how letters shift by 3 positions, numbers stay the same.
✗ Incorrect
Each letter shifts 3 places forward: T->W, e->h, m->p, p->s. Numbers and symbols remain unchanged.
❓ Predict Output
expert2:00remaining
Output of this Raspberry Pi IoT device network security check
What is the output of this code that checks if a device IP is in the allowed list?
Raspberry Pi
allowed_ips = {'192.168.1.10', '192.168.1.11', '192.168.1.12'}
device_ip = '192.168.1.13'
if device_ip in allowed_ips:
print('Device allowed')
else:
print('Device blocked')Attempts:
2 left
💡 Hint
Check if the device IP is in the set of allowed IPs.
✗ Incorrect
The device IP '192.168.1.13' is not in the allowed_ips set, so it prints 'Device blocked'.