1) Input ${\mathrm{mod}}_{1},{\mathrm{mod}}_{2},\cdots ,{\mathrm{mod}}_{N}$ ; N is the number of modulations 2) Input $si{g}_{i}$ ; $1\le i\le q$ 3) $\mathrm{mod}=\left\{{\mathrm{mod}}_{1},{\mathrm{mod}}_{2},\cdots ,{\mathrm{mod}}_{N}\right\}$ 4) Acquire ${f}_{j}$ ; $1\le j\le 13$ for $si{g}_{i}$ and $fea{t}^{13}=\left\{{f}_{1},{f}_{2},\cdots ,{f}_{13}\right\}$ ; ( ${f}_{j}$ is signal feature). 5) Choose three random elements of $fea{t}^{13}$ and assign them to $si{{g}^{\prime }}_{i}$ . $si{{g}^{\prime }}_{i}=\left[{f}_{t},{f}_{h},{f}_{p}\right]$ ; $t,h,p\in \left\{1,2,\cdots ,13\right\}$ 6) Plot $si{{g}^{\prime }}_{i}=\left[{f}_{t},{f}_{h},{f}_{p}\right]$ in 3D 7) Apply k-means clustering (k=N) for $si{g}_{i}$ ; $1\le i\le q$ 8) $\left[si{g}_{i}\right]$ is ${i}^{th}$ cluster and assume ${{I}^{\prime }}_{i}=card\left(\left[si{g}_{i}\right]\right)$ 9) ${c}_{n}=center\left[si{g}_{n}\right]$ ; $1\le n\le N$ 10) ${d}_{n}=\frac{1}{{{I}^{\prime }}_{i}}\sum _{i=1}^{{{I}^{\prime }}_{i}}|si{g}_{i}-{C}_{n}|$ ; $si{g}_{i}\in \left[si{g}_{n}\right]$ 11) Receive $si{g}_{i+1}$ and do stage 4 to 6 then continue. 12) ${d}_{\left(i+1,n\right)}=\left\{|si{g}_{i+1}-{c}_{n}|,1\le n\le N\right\}$ and $T=\left\{{d}_{\left(i+1,1\right)},\cdots ,{d}_{\left(i+1,N\right)}\right\}$ 13) ${T}_{m}=\mathrm{min}\left\{{d}_{\left(i+1,n\right)},1\le n\le N\right\}$ , there exist $m$ , $1\le m\le N$ such that ${T}_{m}\equiv {d}_{\left(i+1,m\right)}$ 14) ${T}^{m}=\left\{{d}_{\left(i+1,n\right)}|1\le n\le N,n\ne m\right\}$ ; while ${d}_{\left(i+1,m\right)}$ is omitted. 15) If ${d}_{\left(i+1,m\right)}\le {d}_{m}$ thus $si{g}_{i+1}\in \left[si{g}_{m}\right]$ then go to stage 28. 16) Else compute the average power of ${m}^{th}$ cluster ( ${P}_{m}$ ) and ${P}_{i+1}$ as the power of $si{g}_{i+1}$ . 17) If ${P}_{i+1}\le {P}_{m}$ thus $si{g}_{i+1}\in \left[si{g}_{m}\right]$ then go to stage 28. 18) Else Calculate the average SNAR of cluster m, $SNA{R}_{m}=\frac{1}{{{I}^{\prime }}_{m}}\sum _{i=2}^{{{I}^{\prime }}_{m}}\frac{{\mu }_{si{g}_{\left(i-1\right)m}}+{\mu }_{si{g}_{im}}}{{\sigma }_{si{g}_{\left(i-1\right)m}}+{\sigma }_{si{g}_{im}}}$ ${\mu }_{si{g}_{\left(i-1\right)m}}$ is the Mean and ${\sigma }_{si{g}_{\left(i-1\right)m}}$ is the Standard Deviation of ${\left(i-1\right)}^{th}$ signal from cluster m respectively. 19) Compute the average SNAR of $si{g}_{i+1}$ , $SNA{R}_{\left(i+1,m\right)}=\frac{1}{{{I}^{\prime }}_{m}}\sum _{i=1}^{{{I}^{\prime }}_{m}}\frac{{\mu }_{si{g}_{i+1}}+{\mu }_{si{g}_{\left(i+1,m\right)}}}{{\sigma }_{si{g}_{i+1}}+{\sigma }_{si{g}_{\left(i+1,m\right)}}}$ 20) If $SNA{R}_{\left(i+1,m\right)}\le SNA{R}_{m}$ thus $si{g}_{i+1}\in \left[si{g}_{m}\right]$ then go to stage 28. 21) Else calculate the average BER of cluster m, $BE{R}_{m}=\frac{1}{{{I}^{\prime }}_{m}}\sum _{i=2}^{{{I}^{\prime }}_{m}}0.5×erfc\left(sqrt\left(10^\left(\frac{{\mu }_{si{g}_{\left(i-1\right)m}}+{\mu }_{si{g}_{im}}}{20\left({\sigma }_{si{g}_{\left(i-1\right)m}}+{\sigma }_{si{g}_{im}}\right)}\right)\right)\right)$ 22) $BE{R}_{\left(i+1,m\right)}=\frac{1}{{{I}^{\prime }}_{m}}\sum _{i=1}^{{{I}^{\prime }}_{m}}0.5×erfc\left(sqrt\left(10^\left(\frac{{\mu }_{si{g}_{i+1}}+{\mu }_{si{g}_{\left(i+1\right)m}}}{20\left({\sigma }_{si{g}_{i+1}}+{\sigma }_{si{g}_{\left(i+1\right)m}}\right)}\right)\right)\right)$ 23) If $BE{R}_{\left(i+1,m\right)}\le BE{R}_{m}$ thus $si{g}_{i+1}\in \left[si{g}_{m}\right]$ then go to stage 28. 24) Else ${T}_{m}=\mathrm{min}\left({T}^{m}\right)=\mathrm{min}\left\{{d}_{\left(i+1,n\right)}|1\le n\le N,n\ne m\right\}$ , there exist $1\le m\le N-1$ such that ${T}_{m}={d}_{\left(i+1,m\right)}$ 25) If ${T}^{m}=\varphi$ then go to stage 27. 26) Else go to stage 15. 27) Announce $si{g}_{i+1}$ is a malicious user. 28) Input another signal $si{g}_{i+1}$ = SIG go to stage 11.