In the final act of Mission: Impossible - Dead Reckoning Part One, Tom Cruise's Ethan Hunt pulls out all the stops. He has no choice after going rogue, realizing even the Impossible Missions Force (IMF) is filled with people he can't trust. Everyone wants to get their hands on the Entity, which is an artificial intelligence tool that's grown sentient and is collecting the secrets of several world powers.
Source:https://www.cbr.com/mission-impossible-7-ending-explained/