Oh how I know this problem. I will be honest, it is a tough one to break because YOU have to be 100% consistent in correcting this problem. It may take a few weeks of hard work, but it can come to a minimum if you put your effort into it.
I have a just turned 9 year old daughter, so I recently went through this. First, you need to create a chart of the punishment for the crime. We are Christians and I printed a biblical based chart that someone gave me (could email it to you if you are interested - ____@____.com ) but this method still works even if you dont use God's word.
The chart addresses attitude, complaining, laziness, order (good for the room!), etc.
So our chart says: First offense you have to write the sentence once, second offense you have to write it twice and the third time you have to write the sentence 10 times because obviously you didnt get it the first 3 times.
Rules:
The slat is wiped clean at the beginning of the day.
Writing must be neat, dated and with the time and signed off by a parent.
If unacceptable then you must re-do the work.
I took a pocket folder with brad and put lined paper in one pocket and all the sentences I had printed in the brads. I also made a sample of what I expected the sentence to look like (neat with date/time).
When the first slight hint of an attitude or back-talk came, I handed her the folder and said calmly, one sentence for attitude or for back-talk or whatever it was. (or two or ten, she only got to ten one day before she never had to write it ten times again)
Again, our sentences were scriptures, but you could easily make up your own sentences like, "I will not have a negative attitude towards my parent or any other." or "I will keep my room clean and in order because I cherish my belongings". You get the picture.
I know it doesnt sound like much, you can always ground her from tv, extra curricular time, etc. But I have found it is hard to stick to things like that and it also doesnt get to the route of the problem. There is something about writing it, those thoughts get cemented into your brain.
When I was a child my mother found that I had stuck gum under her hallway table. I had to sit in my room one weekend and write 100 times, "I will not stick gum on any kind of furniture." I was in the second grade, it took me all weekend and I NEVER in my life have stuck gum anywhere. Even in highschool where I knew I wouldnt get caught, I had no desire to do such a thing.
Good luck, I wrote a novel, but this worked well for me. The folder is hardly ever touched anymore, it does work! :)