Most likely your catalytic converter. I had the same problem, it would rattle when at idle, and sounded like it was taking a turd when i turned the Jeep off, it would occasionally bang around when going over big bumps as well...i actually just replaced it with a Magnaflow catalytic converter and all my problems have been solved. It has even improved the tone of my exhaust.
It is a direct bolt on with a new head pipe too. If you dont replace it soon, most likely you will blow an O2 sensor and it will throw the check engine light on.
1997 TJ SPORT
4.0L, Ford 8.8 locked, AX-15, 3.5" of lift, 33" BFG KM2, SYE & UCF TT, JKS disco's, Warn 9.5ti, MetalCloaks
2000 Subaru 2.5RS
@subydoo44 (pretty much all wheeling pics)