There is no safe way for a homeowner to repair a chimney unless you are a skilled mason. You could use a liner or a flexible chimney pipe fit inside your chimney, but even this should be installed by a pro.
Find out where the leak is coming from. If its from the top, put a cover on the top that vents. This will keep the rain from coming down the chimney. If there are cracked in the brick have new motar put in.