Currently, industry and academia have shown much interest in security and privacy protection on the blockchain used in various applications. Attacks like privacy leakage and data loss make conventional methods vulnerable before emerging blockchain technology. Blockchain is a decentralized and tamper-resistant public ledger technology that guarantees security and data reliability in a peer-to-peer network. Many fields have employed blockchain, from the beginning cryptocurrency to the smart contract, social services, industry, and artificial intelligence. There are blockchain reports on vulnerabilities and security, but they lack a comprehensive survey in attacks, privacy, and security views. In this survey, we first briefly overviewed blockchain. Second, we discussed challenges and issues on the blockchain. Third, we focused on the blockchain attacks, including their cause and targeted area. We also displayed possible preventive measures in the blockchain attack. Finally, we conducted a systematic study on solutions to the blockchain security increase. In addition, this survey included
blockchain privacy techniques.