A semiconductor device includes: a detector that detects unauthorized access; and a reconfiguration unit that, in response to detection of the unauthorized access by the detector, reconfigures a reconfiguration area where a circuit that defines an operation was present to a state in which the circuit does not execute an operation based on the circuit.