As I have searched allot for this so I put it hear maybe it can save time for others like me.
I have understood that **hosts** in **Packet Tracer** are not really configurable to do much works so I can't install packages or run special codes on them.
Instead I decided to use **GNS3** which i can have my own configured **VMs** on hosts and so I can run my desired attack scripts for simulation. There are lots of tutorials on how to create your own VMs in GNS3.