Vent Pipe Replacement In Attic
You should use ABS (black plastic sewer pipe).
I would remove (unthread) the iron elbow and thread on an ABS female adapter (it looks like 2&quot; to me, but there is nothing in your pictures for size reference). From there I would glue up a 45° ell, a short piece of ABS pipe, then another 45° ell to accomplish the 90° turn to vertical (this will eliminate the &quot;dead leg&quot; of pooling rain water that likely caused the corrosion and failure of the old pipe), arranged such that the top of the last 45° ell is directly centered below the roof flashing.
Then, because it looks like there is a size change (to 3&quot;, or maybe 4&quot;, hard to tell...) glue up a bell reducer to transition to the larger pipe size. Then glue in an appropriate length of the larger pipe size to go up through the flashing. Roof tar around the flashing and done.
Because of variability by region, pricing is not on-topic here, but $599 seems like too much to me. The parts would be in the range of $35 - $70 US dollars.
Also, support the pipe with some metal strapping.