If you want to do it correctly...remove shingles and install flashing as needed.
Another way is to install some 3 inch plumbers roof vents and use pipe to attach your structure to in the attic. Then flash it or use rubber roofing. We have used this to build a deck over a roof.
Without seeing a picture or having a little more to work with....thats all I have.
Pictures are easy.