If writing a thesis on behalf of another person is against the university's rules, this action and receiving money for it are problematic.