With the help of the new library angles of TikZ 3.0.0 and a small patch, it is possible to get:

thanks to:
\begin{tikzpicture}
\draw ( 0 , 0 ) coordinate (A)
-- ( 4 , 0 ) coordinate (C)
-- ( 0 , 3 ) coordinate (B)
-- ( 0 , 0 )
pic [draw,blue,thick,angle radius=0.5cm] {squared angle = A--C--B}
pic [draw,red,thick,angle radius=0.5cm] {squared angle = C--A--B}
pic [draw,green,thick,angle radius=0.5cm] {squared angle = C--B--A};
;
\end{tikzpicture}
The complete code:
\documentclass[tikz,border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{angles}
\makeatletter
\tikzset{
pics/squared angle/.style = {
setup code = \tikz@lib@angle@parse#1\pgf@stop,
background code = \tikz@lib@angle@background#1\pgf@stop,
foreground code = \tikz@lib@squaredangle@foreground#1\pgf@stop,
},
pics/squared angle/.default=A--B--C,
angle eccentricity/.initial=.6,
angle radius/.initial=5mm
}
\def\tikz@lib@squaredangle@foreground#1--#2--#3\pgf@stop{%
\path [name prefix ..] [pic actions]
([shift={(\tikz@start@angle@temp:\tikz@lib@angle@rad pt)}]#2.center)
|-
([shift={(\tikz@end@angle@temp:\tikz@lib@angle@rad pt)}]#2.center);
\ifx\tikzpictext\relax\else%
\def\pgf@temp{\node()[name prefix
..,at={([shift={({.5*\tikz@start@angle@temp+.5*\tikz@end@angle@temp}:\pgfkeysvalueof{/tikz/angle
eccentricity}*\tikz@lib@angle@rad pt)}]#2.center)}]}
\expandafter\pgf@temp\expandafter[\tikzpictextoptions]{\tikzpictext};%
\fi
}
\makeatother
\begin{document}
\begin{tikzpicture}
\draw ( 0 , 0 ) coordinate (A)
-- ( 4 , 0 ) coordinate (C)
-- ( 0 , 3 ) coordinate (B)
-- ( 0 , 0 )
pic [draw,blue,thick,angle radius=0.5cm] {squared angle = A--C--B}
pic [draw,red,thick,angle radius=0.5cm] {squared angle = C--A--B}
pic [draw,green,thick,angle radius=0.5cm] {squared angle = C--B--A};
;
\end{tikzpicture}
\end{document}
The desired output seems to have the box filled in red as well as a label, hence let's use the quotes library:
\documentclass[tikz,border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{angles,quotes}
\makeatletter
\tikzset{
pics/squared angle/.style = {
setup code = \tikz@lib@angle@parse#1\pgf@stop,
background code = \tikz@lib@angle@background#1\pgf@stop,
foreground code = \tikz@lib@squaredangle@foreground#1\pgf@stop,
},
pics/squared angle/.default=A--B--C,
angle eccentricity/.initial=.6,
angle radius/.initial=5mm
}
\def\tikz@lib@squaredangle@foreground#1--#2--#3\pgf@stop{%
\path [name prefix ..] [pic actions]
([shift={(\tikz@start@angle@temp:\tikz@lib@angle@rad pt)}]#2.center)
|-
([shift={(\tikz@end@angle@temp:\tikz@lib@angle@rad pt)}]#2.center);
\ifx\tikzpictext\relax\else%
\def\pgf@temp{\node()[name prefix
..,at={([shift={({.5*\tikz@start@angle@temp+.5*\tikz@end@angle@temp}:\pgfkeysvalueof{/tikz/angle
eccentricity}*\tikz@lib@angle@rad pt)}]#2.center)}]}
\expandafter\pgf@temp\expandafter[\tikzpictextoptions]{\tikzpictext};%
\fi
}
\makeatother
\begin{document}
\begin{tikzpicture}
\draw ( 0 , 0 ) coordinate (A)
-- ( 4 , 0 ) coordinate (C)
-- ( 0 , 3 ) coordinate (B)
-- ( 0 , 0 )
pic [draw,fill=red,angle radius=0.5cm,angle eccentricity=2,
"$90^\circ$" {black,font=\footnotesize}] {squared angle = C--A--B}
;
\end{tikzpicture}
\end{document}
The result:
