Challenge - 5 Problems
Capabilities Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Effect of Dropping a Capability in Docker
You run a Docker container with the command:
What will be the output or result of this command?
docker run --rm --cap-drop=NET_RAW alpine ping -c 1 8.8.8.8
What will be the output or result of this command?
Docker
docker run --rm --cap-drop=NET_RAW alpine ping -c 1 8.8.8.8
Attempts:
2 left
💡 Hint
Dropping NET_RAW capability disables raw socket creation needed by ping.
✗ Incorrect
The NET_RAW capability allows creating raw sockets. Dropping it prevents ping from working, causing a permission error.
🧠 Conceptual
intermediate1:00remaining
Understanding Privileged Mode in Docker
What is the main effect of running a Docker container with the
--privileged flag?Attempts:
2 left
💡 Hint
Think about what 'privileged' means in terms of access rights.
✗ Incorrect
The --privileged flag gives the container almost all capabilities and disables many security restrictions, allowing full access to host resources.
❓ Configuration
advanced1:30remaining
Configuring a Docker Container to Add a Capability
You want to run a container that needs the ability to change system time. Which Docker run option correctly adds the required capability?
Attempts:
2 left
💡 Hint
Changing system time requires SYS_TIME capability.
✗ Incorrect
The SYS_TIME capability allows changing the system clock. Adding it with --cap-add=SYS_TIME enables this inside the container.
❓ Troubleshoot
advanced2:00remaining
Diagnosing Permission Issues with Docker Capabilities
A containerized application fails with 'Operation not permitted' when trying to modify network interfaces. The container was started with:
What is the cause of the failure?
docker run --rm --cap-drop=NET_ADMIN myapp
What is the cause of the failure?
Attempts:
2 left
💡 Hint
NET_ADMIN controls network administration tasks.
✗ Incorrect
NET_ADMIN capability is required to modify network interfaces. Dropping it causes permission errors for such operations.
✅ Best Practice
expert2:30remaining
Security Best Practice for Running Containers with Capabilities
Which practice best improves container security regarding Linux capabilities?
Attempts:
2 left
💡 Hint
Think about the principle of least privilege.
✗ Incorrect
Starting containers with no capabilities and adding only those needed minimizes attack surface and improves security.