The SIM card (Subscriber Identity Module) stores the cryptographic keys that identify the subscriber account and let it connect to the cellular network.
Every SIM card has a little microprocessor built-in, so those secrets never leave the SIM card. This is donr specifically to prevent the type of eavesdropping attack that you're suggesting.