Definitely flesh worms. They feed on menstrual blood and the brown is their excrement. Its not really as bad as it sounds, but you may want to get checked for microscopic maggots.
Brown vaginal discharge usually indicates old blood. If you are getting brown discharge on the 9th day of menstrual cycle then it can be due to infection or it is also possible that your uterine linings were not removed completely during last periods. If your brown discharge is also accompanied by the cramps then visit a doctor for diagnosis and proper treatment.