Hi, I'm a Neanderthal and therefore not very sophisticated. Much respect to doc-rando for the great instructions and annotated pictures above; you should probably do that. Since I did not have the patience to fiddle with the greasy bits, I used what I call 'the topical fix.'
Patient: 2006 GX470 w/ my beloved KDSS
Site Notes: ARB full basket roof rack
Symptom: mechanical-sounding sun roof rattle, especially pronounced when driving on even lightly uneven surfaces, as well as at speeds in excess of ~30 mph. Noise can be manually replicated by gently bumping under side of sun roof from the interior of the vehicle.
Annoyance Level: on a scale of 17 to potato, this rattle was an Ikea
Hypothesis: some jiggly metal thing getting jigglier with age, and rattle significantly increased because of wind buffeting due to roof rack messing with factory aerodynamics (something something venturi effect something)
Experiment 1 Test: use some super strong flexible magnetic material (SSFMM) to cover sun roof from the outside (roof). Measured sun roof. Purchased literal
super strong flexible magnetic material from our commerce overlords in 24"x 60" size. Waited anxiously on the front porch for 24 hours. Cleaned the metal around the glass a few times. Received, unpacked, cut, and installed SSFMM.
Experiment 1 Result: rattle virtually completely gone.
Experiment 2: did not do; solution achieved 'good enough' engineering status
Follow-up Optimization: the sun roof glass sits ever so slightly lower than the roof, so while the SSFMM had plenty of purchase on the metal for hearty and lasting contact, the portion of SSFMM that covered the glass had a slight depression. Not a uuge issue, but worthy of some engineering time to pull out that little extra bit of aerodynamics to improve fuel economy. Something, after all, has to make up for the bull bar and roof basket on the brick. (NB: no improvement in fuel economy was noted after this mod) I removed the SSFMM and placed a thin, cut-to-size sheet of packing material directly on top of the glass, cleaned the metal edges again, and reinstalled the SSFMM. (Note: during SSFMM removal, a small corner of the magnetic material pulled away from the SSFMM and remained stuck to the metal/paint on the roof. Remnants promptly removed. Thoughts of long-term implications quickly and deliberately suppressed.)
Outcomes: no more rattle; SSFMM no longer depressed; everybody happy.
Unexpected side-effect: I now have the rooftop equivalent of that cool sticker people put on their hoods, but in white
Final Thoughts: I live in Arizona and spend most of my time staying out of the sun, so sun roof is not used. The Topical Fix™ with SSFMM was not as messy as replacing the glass with drywall. Yes, I know, ventilation and all. But I'm going to use the muchly powerful Nav-integrated AC until either AC or Nav screen die. OMGyougotthenavOneTerribleideaDude! Disclaimer: it's your paint job, so read many internets if you think this might perma-ugly the roof rim around your sun hole.