Durham steel fitting where made for drains on old cast iron systems.
Cut that off behind the fitting. use a band seal fitting and install a new plastic drain. be careful. the next nipple going into the wall maybe just a rotten.
You might have to go into the wall and replace the tee. That nipple will not come of the tee.
I tell them "if you're not standing behind Me , watching ME work, then you won't get an eyeful.
I was showing a lady customer a crack in her toilet tank.
"Can you see it? It's right there! "
She pointed at my back and replied,
" No , But I so one right there!!