It's not hideously difficult to calculate the trajectory of a light beam in the Schwarzschild metric. You'll find the calculation in any introductory book on General Relativity. The result is that light will orbit the mass (whether it's a black hole or not) at a distance of $r = 3M$, where $M$ is the geometrical mass $Gm/c^2$. So:
$$ r_{orbit} = \frac{3Gm}{c^2} $$
or:
$$ m = \frac{r_{orbit} c^2}{3G} $$
For a 1km orbit I get the mass to be $4.5 \times 10^{29}$ kg.
Later: Since the duplicate question doesn't give you the period of the orbit I'll go ahead and calculate it.
The radius is 1000m, and this is the radius in Schwarzschild co-ordinates, so by definition the circumference of the orbit is just $2 \pi r$ or $2000\pi$. But, if we are Schwarzschild observers time is dilated at a radius $r$, and the dilation factor is $\sqrt{1 - 2M/r}$. At $r = 3M$ the factor is $\sqrt{1/3}$ so we measure the light to be moving at $c/\sqrt{3}$. That means that we observe the period to be:
$$ \tau = \frac{2000\pi}{c/\sqrt{3}} $$
which is about 36$\mu$s.
Response to comment:
I don't think this is a good place to go through the derivation of the photon orbit radius because any GR textbook will have it. My preferred introductory book "A first course in general relativity" by Bernard F. Schutz derives this at the beginning of chapter 11. The derivation takes three pages and even then relies on results from earlier in the book. So instead I'll just outline the derivation.
The symmetry of the metric can be used to obtain an expression for the 4-momentum. Using this it's relatively easy to calculate an expression for the orbit, and from this we extract an effective potential, which for a photon is:
$$ V^2(r) = \left( 1 - \frac{2M}{r}\right) \frac{L^2}{r^2} $$
where $L$ is the angular momentum. The reason the effective potential is so useful is that we get a circular orbit only when $V(r)$ is at a minimum or maximum. A minimum give a stable orbit and a maximum gives an unstable orbit. So we look for a minimum or maximum by differentiating $V(r)$ with respect to $r$ and setting this to zero. Actually we'll make life easier by differentiating $V^2(r)$ and setting this to zero to get:
$$ \frac{-2L^2}{r^3} - \frac{-6ML^2}{r^4} = 0 $$
and this has just one solution at $r = 3M$. This turns out to be a maximum, so the orbit at $r = 3M$ is unstable i.e. if we perturb the orbit the tiniest distance away from a perfect circle the photon will either fly away from or fly into the black hole.