mirror of
https://github.com/srlabs/blue-merle.git
synced 2025-01-02 19:10:49 -05:00
blue-merle: generate a temporary IMEI before the the SIM switch
After shutting down the modem and before replacing the SIM, we generate a temporary random IMEI to prevent accidental disclosure of the new IMSI under the old IMEI. It should not happen but we do not control the modem as much as we'd like, e.g. fully power it down. So it may not be necessary but we consider it defense in depth.
This commit is contained in:
parent
fe4021feb9
commit
03c262a8c3
@ -44,6 +44,14 @@ while [[ "$answer" -eq 1 ]]; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
## We have just disabled the modem so it should not log on to any network.
|
||||||
|
## We set a random IMEI now only to have it overwritten very soon after
|
||||||
|
## the SIM card has been replaced. We intend to prevent an accidential
|
||||||
|
## leak of the new SIM's IMSI with the old IMEI just in case the modem
|
||||||
|
## accidentally tried to log in to the network.
|
||||||
|
python3 /lib/blue-merle/imei_generate.py -r
|
||||||
|
|
||||||
|
|
||||||
echo -n "Please now replace the SIM card and press any key to continue. "
|
echo -n "Please now replace the SIM card and press any key to continue. "
|
||||||
read answer
|
read answer
|
||||||
|
|
||||||
|
@ -61,6 +61,12 @@ while [[ "$answer" -eq 1 ]]; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
## We generate a random IMEI to prevent a leak of the
|
||||||
|
## new SIM's IMSI under the old IMEI in case the modem
|
||||||
|
## still talks to the network
|
||||||
|
python3 /lib/blue-merle/imei_generate.py -r
|
||||||
|
|
||||||
|
|
||||||
mcu_send_message "Replace the SIM card. Then pull the switch."
|
mcu_send_message "Replace the SIM card. Then pull the switch."
|
||||||
|
|
||||||
echo done > /tmp/blue-merle-stage1
|
echo done > /tmp/blue-merle-stage1
|
||||||
|
Loading…
Reference in New Issue
Block a user