Your best bet would be used. The cheapest new bike I can think of is the On One 456 Evo2 with Deore build, but it goes for a little over a thousand. Check pinkbike and craigslist for deals on used bikes.
You could check out Giant's low end offerings, but the components won't be great, especially not the fork. Though with SR Suntour's upgrade program you can get yourself a decent fork for ~$200. I went the cheap bike route and upgraded mostly everything. bought new brakes Avid BB7 mechanical brakes, upgraded the Suntour fork, new drivetrain, and new bar and stem. I then bought a new frame and quickly upgraded the brakes (twice) and another new fork. Moral of the story, in the $500 range either really plan out your upgrades and make sure that they're transferrable as you grow and progress as a rider (or risk upgrading, and then upgrading again as you do, which can be fun but really hurts the wallet), get cheap a bike that'll hold you over until you're sure you want something more all mountain-y with friendlier angles and a burlier build, or look for something used. Used might be the most cost effective option haha.
Good luck! $500 a tricky price point to hit but if you search I bet you'll be able to find something.