An exploit is a piece of code, data, or a sequence of commands designed to take advantage of a vulnerability or bug in a computer system or software. Its purpose is to cause unintended behavior, often leading to unauthorized control, data theft, or a denial of service.