1. An electronic component comprising: a reference-obtaining device configured to obtain a physical magnitude, referred to as a reference magnitude, which is dynamically adjustable and representative of an expected activity of said component; a tracking circuit configured to output a value representative of real activity of said component; a first comparator configured to compare said dynamically adjustable reference magnitude with a magnitude of the value of a same type representative of real activity of said component; and a detector configured to detect an attack as a function of a result of said comparison, wherein the component comprises a plurality of modules, the dynamically adjustable reference magnitude being a function of the active or non-active character of each module of the plurality of modules and is representative of an expected activity of the component.