The Evil Cookies are objects that appear in the Sonic Boom series They are deceptively baked treats created by Dr. Eggman, which, when infused with a person's DNA, will turn their consumer into a clone of the aforementioned person.
The Evil Cookies can only be made through a machine designed by Dr. Eggman, who invented it for this specific purpose. By providing it with DNA, this machine can create ordinary-looking chocolate chip shortbread cookies infused with said material. In some cases, the Evil Cookies' appearance reflects a person's DNA.
Evil Cookie can turn their consumers into a "clone" of the person whose DNA is infused in the cookie, giving them that person's personality, abilities, and prominent physical characteristics. For example, eating an Evil Cookie with Eggman's DNA will make the consumer an evil genius and grow a mustache like Eggman's. However, they do not completely override their consumer's personality; Amy retained her bossiness, Sticks kept her paranoia, and Knuckles was still dimwitted despite getting a (slight) boost in intelligence. The only cure for an Evil Cookie is to feed the consumer another one infused with their original DNA.
The Evil Cookies were created by Dr. Eggman in his lair. Infusing them with his own DNA, Eggman snuck a batch of them to Sonic's Shack for Sonic to eat, only for Tails, Knuckles, Amy and Sticks to eat them instead. The now-evil heroes then joined Eggman to plan Sonic's annihilation, but they soon turned on themselves. To stand a chance, Sonic made an Evil Cookie with his DNA and fed it to Eggman, giving him his powers and heroism. Together, they produced new Evil Cookies which cured Team Sonic. Not liking the new Eggman either, Team Sonic cured him with his own Evil Cookie.