Official way to obtain an OS X ISO file
Does not work on Mavericks and Yosemite
There is no way to legitimately get the file without having access to a Mac, and a licensed copy of the OS via a purchase (unless you are a member of the Developer Program, for which you can expect to pay far more than the cost of the OS, what with it being free).
But if you can blag some access time on a Mac, then you can download the OS from the Mac App Store (You may need to Option+Click the Purchased section to force it to reshow them if you have downloaded them at least once already).  Once you have the installer downloaded and sat in your dock, you can simply pick it apart and get to  the image file that is inside it.
This is the official way to get the file direct from Apple, but there is still work to do to make it into an ISO:

Once you’ve downloaded Mavericks, find the installer on your Mac. It’s called Install OS X Mavericks.app and it should have been downloaded to your main Applications folder or be sat in your Dock.

Right-click (or Control+click) the installer, and choose Show Package Contents from the resulting contextual menu.

In the folder that appears, open Contents &gt; Shared Support; you’ll see a disk image file called InstallESD.dmg
This dmg file is in essence an ISO file in s slightly different format.  We'll need to convert it.  Open up Disk Utility and:

From the menu bar, select Images &gt; Convert and point it to your .dmg file

In the Save As dialog that follows, select DVD/CD master. Disk Utility will insist on saving the new ISO as a .cdr file, but it is really an ISO.

When complete, you can rename it to .iso in Finder.

Use an external HD or thumb drive which is in ExFAT format (Compared to FAT format, this allows for single files larger than 4GB). Copy the .iso file and access it on the other system.


For clarity, you can do the above on any version of OS X from 10.6.8 (Snow Leopard) onwards, so you can use an old image to get hold of a new image for example, if you have access to a different OS version than Mavericks.