Let $\sigma$ be the sum of divisors function. First I note that If $n \geq 28$ then $\sigma(n) > 28$. So we must have $n < 28$. Next note that if $n$ is a prime then $\sigma(n)=n+1 = 28 \iff n = 27$, which is a contradiction. So $n$ is not a prime. This leaves us to check the numbers $1,4,6,8,9,10,12,14,15,16,18,20,21,22,24,25,26$. Which the only number that works is $n = 12$, as $\sigma(n)=1+2+3+4+6+12=28$.
But that was a lot of work, can the search be narrowed down even further? Perhaps by looking at what factors $n$ can have? Minimum size of $n$? I know $\sigma(n)\leq n\tau(n)$.