Nick Cafardo (via MLB Trade Rumors) reports that the Red Sox "have long admired" Joel Hanrahan, and that he "appears to be their top target." Cafardo writes that the Red Sox would not be willing to give up pitcher Felix Doubront. That makes sense, obviously, which is too bad, because getting a young lefty starter with a very healthy strikeout rate and a ton of time before free agency for one year of Hanrahan would be cause for celebration.
Cafardo speculates (at least I think it's speculation; it's so hard to tell with these rumors posts) that someone like Franklin Morales or Alfredo Aceves might be more realistic. I have no idea why the Pirates would want Aceves for Hanrahan.
Morales, who had a pretty good season as a swingman, is more interesting. If the Pirates think Morales can stick as a starter, then trading for him makes sense. Even if he's only a reliever, as a pure baseball trade, Hanrahan for Morales would be very reasonable, in that the Pirates would get a potential late-inning guy they could control for three more years. But it's not that hard, in the grand scheme of things, to find good relievers, and one would hope that the Pirates would hold out and try to wring a little more out of some team willing to pay for Hanrahan's reputation as a closer.
Update (by Vlad): When the Rockies traded Morales to the Red Sox in 2011, there were reports that the Pirates were the runner-up in the bidding for the lefty. See this tweet from Denver Post writer Troy Renck for one example.