Donut gasket. You need 2 of them.
did the flange come apart or did the pipe break, if the pipe broke then you will have to replace the system fron the flange back, these exhaust systems look good but corrode from the inside out, get a new system i will probably come in three pieces, and new hangers, its pretty straightforward
the donut is cast into the exhaust manifold.
Check the heat shield on the Catalytic Converter, after a few years they start to rust off and rattle. Crawl under the Pathfinder and bang along the Converter and muffler area and see where it's coming from.
Good chances are, it's from the heat shield since you already had everything changed from the Cat back.
Good luck and hope this helps.
Flex pipe will work, or if it's a straight section of pipe you can buy a universal piece of exhaust tubing with flared ends, trim off the rusty ends on your original pipe with a hacksaw or Sawzall and slip in the new section. Clamp it with 2 muffler clamps and you're set. Total cost should be under $40.