Courseiva

CPENT Practice Question: Privilege Escalation Lateral Movement And Post Exploitation

An operator has compromised a Linux server and wants to establish persistence via a Cron job that runs every 5 minutes as the root user. Where should the persistence mechanism be placed to ensure execution without modifying /etc/crontab directly?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

/etc/cron.d/custom_persistence with the format '* * * * * root /bin/nc ...'

Placing a script in /etc/cron.d/ or directly in the root user's crontab via crontab -e (stored in /var/spool/cron/crontabs/root) achieves persistence. Alternatively, /etc/cron.5mins/ if configured, but /etc/cron.d/ is standard.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ~/.bashrc of the current low-privileged user.

    Why it's wrong here

    ~/.bashrc runs only upon interactive shell login for that specific user, not as root every 5 minutes.

  • /etc/init.d/rc.local execution hook.

    Why it's wrong here

    rc.local runs at system boot, not every 5 minutes.

  • /etc/cron.d/custom_persistence with the format '* * * * * root /bin/nc ...'

    Why this is correct

    Files placed in /etc/cron.d require specifying the username (e.g., root) and execute on the specified schedule.

  • /var/www/html/backdoor.php

    Why it's wrong here

    A web shell provides web access, not a direct Cron job execution.

About these practice questions

One of 274 original CPENT practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official EC-Council exam blueprint

This CPENT practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CPENT exam.