3 Answers
3

You can only buy OS X Mountain Lion through the Mac App Store, which again only runs on OS X 10.6 and above.

If you can get hold of any Mac, sign up for the App Store, then download OS X for installation on that machine, it will download an .app file which contains the installation disk image for OS X Mountain Lion.

Note that in any case, the license only permits you to run OS X on an Apple computer (and virtualization only when running OS X as a host), and in countries where software licenses are legally enforced, circumventing that may be considered illegal. But IANAL.

to download, install, use and run for personal, non-commercial use, one (1) copy of
the Apple Software directly on each Apple-branded computer running OS X Lion or OS
X Snow Leopard (“Mac Computer”) that you own or control;

[…]

to install, use and run up to two (2) additional copies or instances of the Apple
Software within virtual operating system environments on each Mac Computer you own
or control that is already running the Apple Software, for purposes of: (a) software
development; (b) testing during software development; (c) using OS X Server; or (d)
personal, non-commercial use

As legit as possible? The Mac OS X license only permits installation on Apple labelled hardware.

You could by a wrecked machine that came with install media for an older OS X, and the sale would be legal, but you still can't install it legally. If you did the install, you could upgrade through the App Store, but, alas, not legally.