Examine prompt injection as a security risk for large language model applications and explore layered approaches for reducing that risk. Learners begin with course prerequisites, LLM prompt processing, and the core prompt injection vulnerability. The course explores direct prompt injection attacks, attacker goals, and guided practice. Later modules examine indirect and advanced attacks involving retrieved content, retrieval-augmented generation (RAG) poisoning, invisible text injection, and agent-related risks. Learners review real-world LLM failure cases and consider how unsafe or unreliable outputs can arise. The course introduces defense in depth and practical controls that can reduce exposure, followed by automated AI red teaming with tools such as promptfoo, garak, and PyRIT. By the end, learners can distinguish direct and indirect prompt injection, identify common attack paths, explain layered defense concepts, and describe how automated testing evaluates LLM application behavior. Defenses reduce risk; they do not guarantee immunity.

Securing LLMs Against Prompt Injection

Securing LLMs Against Prompt Injection
This course is part of AI Cybersecurity Specialization

Instructor: EC-Council
Included with Learn more
Gain insight into a topic and learn the fundamentals.
Intermediate level
Recommended experience
1 week to complete
at 10 hours a week
Flexible schedule
Learn at your own pace
What you'll learn
Explain prompt processing and distinguish direct and indirect prompt injection.
Identify risks involving retrieved content, RAG poisoning, invisible text, and LLM agents.
Describe real-world LLM failure patterns and layered defense-in-depth approaches.
Explore automated AI red teaming with promptfoo, garak, and PyRIT.
Details to know

Shareable certificate
Add to your LinkedIn profile
Recently updated!
December 2026
Assessments
12 assignments
Taught in English
See how employees at top companies are mastering in-demand skills

Build your subject-matter expertise
This course is part of the AI Cybersecurity Specialization
When you enroll in this course, you'll also be enrolled in this Specialization.
- Learn new concepts from industry experts
- Gain a foundational understanding of a subject or tool
- Develop job-relevant skills with hands-on projects
- Earn a shareable career certificate

There are 7 modules in this course
Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV. Share it on social media and in your performance review.
Instructor

Offered by
Explore more from Security

EC-Council

EC-Council

EC-Council

EC-Council
Why people choose Coursera for their career

Felipe M.
Learner since 2018
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."

Jennifer J.
Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."

Larry W.
Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."

Chaitanya A.
"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."
What brings you to Coursera today?
Advance your career with an online degree
Earn a degree from world-class universities - 100% online


