It's not good to make sweeping statements about the pieces. Such as "pawns are good for attacking/defending". It all depends on the position, the openings you favour etc.
Pawns, for attack or for defence?

idk all the good openings with pawns r defensive, r they not
Nope....
King's Gambit, Fischer's Defence:
King's Gambit, Kieseritzky Gambit:
Alekhine's Defence, Four Pawns Attack:
There's lots more.

Well of course it depends on position. Whether you push them forward or defensively (or leave them there) depends on who has the initiative, and if the pawns moving forward is even necessary. Sometimes the one with the initiative will just do a piece attack on the king. The defensive side rarely wants to push his pawns(non central, getting space in the center would be good if you're castled) too far, unless he's trying to create some defensive shield by preventing the other player from gaining space, but it creates hooks at the same time for files to be open. Or sometimes the weaker side could counter attack on the same wing if the flank attack was premature and the squares they left behind weren't backed up by the pieces, though again the center is best for that.
Is it ever possible to use pawns to hook two major pieces, considering the idea of a large pawn structure in front of them (in modern variations, say?)

Is it ever possible to use pawns to hook two major pieces, considering the idea of a large pawn structure in front of them (in modern variations, say?)
Sorry. I've got no idea what you're talking about.
i mean when you can get two knights with a pawn without sacrificing pawns, by erecting a static pawn structure which can control the center.

You mean is it possible to win 2 pieces simply by building a strong pawn structure?
No. Not unless your opponent is going to play some really poor moves.

i don't get what you're asking
I actually had spit land on my computer from laughing abruptly...his question and then this reply. He sounds like he's asking if anyone will humor him...

i mean when you can get two knights with a pawn without sacrificing pawns, by erecting a static pawn structure which can control the center.
Is english your first language ahacker?
The phrase "get two knights with a pawn" stumps me. I don't know what it means -- and why your ability to get these two knights with a pawn somehow arises from a "static pawn structure which can control the center" is also nigh-on to incomprehensible.
Maybe try posting a section of game.

i mean when you can get two knights with a pawn without sacrificing pawns, by erecting a static pawn structure which can control the center.
lmao. tonight's gonna be a good night.
What are your thoughts using pawns in-game.