attack bitcoin through writing data directly into output's scriptPubKeys
No. This is very fast way to spend your money for nothing. You can not put arbitrary data into to scriptPubKey because there is limited number of standard scripts.

The best thing you can do nowadays is sending 550 satoshi (0.00000550 btc) for bare-multisig outputs m-of-3 created from uncompressed public keys. This will enlarge the UTxO database ( look at https://statoshi.info/dashboard/db/unspent-transaction-output-set ) but will not slow down network itself