The E and B Experiment (EBEX) is a balloon-borne telescope designed to probe polarization signals in the cosmic microwave background. It completed an 11 day flight over Antarctica in December 2012 / January 2013. EBEX requires 10 arcsecond accuracy on attitude determination for post-flight data analysis, and 30 arcminute accuracy for real-time attitude control during flight. The primary pointing sensors employed to achieve these pointing requirements are two redundant star cameras and two redundant sets of orthogonal gyroscopes. This paper is focused on the star cameras. The EBEX star cameras must be robust against multiple classes of challenges that may arise in the long duration balloon-borne environment. These challenges include daytime sky brightness, bright polar mesospheric clouds, uncataloged satellites, thermal effects on the camera focus, and the potential for abnormal inputs from other on-board subsystems. Real-time monitoring and manual intervention by the user is limited by the low communication bandwidth on long duration flights. Each star camera consists of a pressurized vessel containing a digital camera, an embedded computer, a hard disk, and various supporting electronics, along with an optical baffle to limit reflections and reduce atmospheric noise. We developed a dependable, thread-safe, C++ software application that can tackle potential issues with the images and defend against failures in other subsystems. It employs a wide selection of features with robust and efficient algorithms to best prepare for the long duration environment, and was developed with a focus on reliability. The features range from relatively novel to wellestablished, and many of them ultimately proved critical in the recent EBEX flight. We will report on the design, implementation, testing, and successful in-flight performance under challenging conditions of the EBEX star cameras and their associated custom-written software.