8-bis palette

I’m writing an application that can show bitmaps of different
resolutions and color depths at a certain fps. I get the pixel data from
a file that I previously write to the disk using another application.
Then, I simply use fread to get the pixel data, generate the SDL_Surface
and display it. Well, I managed to get it to work with 32 bits, 24 bits,
and 16 bits bitmaps. However, I’m finding it really difficult with 8bit

I know I have to set the palette myself, but I have no idea what the
colors should be. I want it to be the same that Windows uses. I mean,
I’d like to use the same palette MSPaint uses, to give you an example.
Do you have any idea how to fill my palette to achieve this?