It would appear that Summer Glau was lifted into position and is able to sustain that pose because she's extremely flexible. She was, however, given additional support from a hook that was attached to the ceiling and tied to a harness.
A technical question on how Summer stayed on the ceiling in Serenity. She stated the walls were built to her measurements and that she hung from a hook from her back.
Creation Entertainment’s Salute to Firefly & Serenity 2007: Summer Glau & Nathan Fillion Q&A
Note also that the hallway width was measured specifically to fit the distance that she can do the splits. In the Director's Commentary, Joss also mentions that they built it slightly wrong and they added a pipe rail and padded the wall to make the gap smaller.
SFO: Was there anything they told you to do and you thought 'no way'?
SG: [Laughs] The split on the ceiling, but we got up there and we did it. When I was up there it didn't hurt. There was a guy who was helping me, and they had to rebuild the hallway three times because they had to measure my legs. If it's off an inch I can't hold my leg up. So I would get in a split and get situated and I stood up there between takes. It was easier than I thought.
Sci-fi Online - Summer Glau
It was, apparently, not fun.
She was asked about how uncomfortable the pose used for the Serenity publicity photo was. This led on to a story about the famous "splits on the ceiling" scene. Her stunt double just couldn't physically hold the position, so Summer herself had to do it for all the test shots and set up and whatnot. Not only did she have to stay up there during multiple takes, but it was too much difficulty to get her down, and so she had to hold the position in between takes while camera angles and so forth were being changed.
Meeting Summer at Armageddon Expo