A back fire can be caused by one or more problems, here's a few ideas to hope fully get you going,
1) check for blockages in the entire exhaust system
2) check all spark plugs are firing and all coil packs/ht leads(depending on your system set up) you can purchase an inline spark tester to do this.
3) deterioration of carburetor/throttle body rubbers both ends air filter/and manifold end e.g splits/cracks in them they tend to go hard over time.
4) incorrect fuel/air mixture (if yours is carb set up try resetting them) throttle body set up could be a sensor fault/faulty injector etc. and if carb set possible worn needle/jets or internal damage,split diaphragms.
5) check valve clearances
6) check condition of air filters/airfilter box and ducting pipework (e.g not blocked,damaged etc)
7) check condition of you stator and charging system I had it on a zx10r where stator/alternator was failing(causing misfires/backfires) hope this helps,