Nowadays Radio Frequency Identification (RFID) systems have appeared in lots of identification and authentication applications. In some sensitive applications, providing secure and confidential communication is very important for end-users. To this aim, different RFID authentication protocols have been proposed, which have tried to provide security and privacy of RFID users. In this paper, we analyze the privacy of two recently proposed RFID authentication protocols in 2012 and 2013. We present several traceability attacks including traceability, backward traceability and forward traceability against the first protocol. We also show that, the second protocol not only suffers from Denial-of-Service (DoS) attack, but also it is vulnerable to traceability and backward traceability attacks. We present our privacy analysis based on a well-known formal RFID privacy model which has been proposed by Ouafi and Phan in 2008. Then, in order to overcome the weaknesses, we apply some modifications on these protocols and propose two modified versions.
 D. Heyden, "RFID Applications," Available: http://www.fibre2fashion.com/industry-article/11/1023/rfid applications1.asp.
 S. Maharjan, "RFID and IOT: An overview," Simula Research Laboratory University of Oslo, 2010.
 L. Yang, P. Yu, W. Bailing, Q. Yun, B. Xuefeng, and Y. Xinling, "Hash-based RFID Mutual Authentication Protocol," International Journal of Security & Its Applications, vol. 7, no. 3, pp. 1738-9976, 2013.
 B. Song and C. J. Mitchell, "Scalable rfid security protocols supporting tag ownership transfer," Comput. Commun., vol. 34, pp. 556-566, 2011.
 A. Juels, "RFID security and privacy: A research survey," IEEE Journal on Selected Areas in Communications, vol. 24, no. 2, p. 381-394, 2006.
 A. Juels, and S.A Weis, "Defining strong privacy for RFID," in Proceedings of PerCom'07, pp. 342-347, 2006.
 B. Alomair, A. Clark, J. Cuellar, and R. Poovendran, "Scalable RFID systems: a privacy-preserving protocol with constant-time identification," IEEE Transactions on Parallel and Distributed Systems, vol. 23, no. 8, pp. 1536-1550, 2012.
 K. Ouafi, "Security and privacy in RFID systems," PhD Thesis, Ecole Polytechnique Federale DE Lausanne, 2008.
 M. R. Alagheband, and M. R. Aref, "Simulation-based traceability analysis of RFID authentication protocols," Wireless Personal Communications, vol. 77, no. 2, pp. 1020-1038, 2014.
 B. Hameed, I. Khan, F. Durr, and K. Rothermel, "An RFID based consistency management framework for production monitoring in a smart real-time factory," in 2nd International Conference on the Internet of Things (IoT), Tokyo, 2010.
 D. He, and Sh. Zeadally, "An analysis of RFID authentication schemes for Internet of things in healthcare environment using elliptic curve cryptography," IEEE Internet of Things Journal, vol. 2, no. 1, pp. 72 - 83, 2015.
 G. Avoine and X. Carpent, "Yet another ultra-lightweight authentication protocol that is broken," in Workshop on RFID Security-RFID-Sec'12, Nijmegen, 2012.
 M. Asadpour, and M. T. Dashti, "A privacy-friendly RFID protocol using reusable anonymous tickets," in 10th International Conference on Trust, Security and Privacy in Computing and Communications, Changsha , 2011.
 Z. Sohrabi-Bonab, M. Alagheband, and M. R. Aref, "Traceability analysis of quadratic residue-based RFID authentication protocols," in Eleventh Annual International Conference on Privacy, Security and Trust (PST), Tarragona , 2013.
 M. R. Alagheband, and M. R. Aref, "Unified privacy analysis of new founded RFID authentication protocols," Security and Communication Networks, vol. 6, no. 8, pp. 999-1009, 2013.
 M. H. Habibi, M. R. Aref, and Di Ma, "Addressing flaws in RFID authentication protocols," Progress in Cryptology, INDOCRYPT 2011, LNCS 7107, vol. 7, p. 216-235, 2011.
 P. Babvey, H. A. Yajam, and T. Eghlidos, "Security analysis of SKI protocol," in 11th International ISC Conference on Information Security and Cryptology (ISCISC), Tehran, 2014.
 "EPC global Inc.," Available: http://www.epcglobalinc.org.
 H. Y. Chien, and C. H. Chen, "Mutual authentication protocol for RFID conforming to EPC Class 1 Generation 2 standards," Computer Standards & Interfaces, vol. 29, no. 2, pp. 254-259, 2007.
 E.-J. Yoon, "Improvement of the securing RFID systems conforming to epc class 1 generation 2 standard," Expert Syst. Appl., vol. 39, no. 11, p. 1589-1594, 2012.
 M.H. Habibi, M. R. Alaghband, and M. R. Aref, "Attacks on a lightweight mutual authentication protocol under EPC C-1 G-2 standard," in Information Security Theory and Practice. Security and Privacy of Mobile Devices in Wireless Communication, Springer, 2011, pp. 254-263.
 T. C. Yeh, Y. J. Wanga, T. Ch. Kuo, and S. S. Wanga, "Securing RFID systems conforming to EPC Class 1 Generation 2 standard," Expert Systems with Applications, vol. 37, p. 7678-7683, 2010.
 F. Xiao, Y. Zhou, J. Zhou, H. Zhu, and X. Niu, "Security protocol for RFID system conforming to EPC-C1G2 standard," Journal of Computers, vol. 8, no. 3, pp. 605-612, 2013.
 M. Safkhani, N. Bagheri, P. Peris-Lopez, A. Mitrokotsa, J. C Hernandez-Castro, "Weaknesses in another Gen2-based RFID authentication protocol," in IEEE International Conference on RFID-Technologies and Applications (RFID-TA), 2012.
 D. N. Duc, J. Park, H. Lee, and K. Kim, "Enhancing security of EPC global Gen-2 RFID tag against traceability and cloning," in Symposium on Cryptography and Information Security (CSIS), pp. 17-20, 2006.
 S. Karthikeyan, and M. Nesterenko, "RFID security without extensive cryptography," in 3rd ACM Workshop on Security of Ad hoc and Sensor Networks (SASN), pp. 63-67, 2005.
 S. Vaudenay, "On privacy models for RFID," in ASIACRYPT 2007, LNCS 4833, pp. 68-87., 2007.
 I. Coisel, and T. Martin, "Untangling RFID privacy models," Journal of Computer Networks and Communications, pp. 1-26, 2013, doi:10.1155/2013/710275.
 G. Avoine, "Adversarial model for radio frequency identification," Cryptology ePrint Archive,report 2005/049. http://eprint.iacr.org/2005/049, 2005.
 C. H. Lim, and T. Kwon, "Strong and robust RFID authentication enabling perfect ownership transfer," in Proceedings of ICICS '06, LNCS 4307, pp. 1-20, 2006.
 K. Ouafi and R. C.-W. Phan, "Privacy of recent RFID authentication protocols," in 4th International Conference on Information Security Practice and Experience (ISPEC), Springer, 2008.
 R. H. Deng, Y. Li, M. Yung, and Y. Zhao, "A new framework for RFID privacy," in 15th European Symposium on Research in Computer Security (ESORICS), Athens, 2010.
 D. Moriyama, S. Matsuo, and M. Ohkubo, "Relation among the security models for RFID authentication," in 17th European symposium on research in computer security (ESORICS), pp. 661-678, 2012.
 M. Safkhani, N. Bagheri, S. K. Sanadhya, and M. Naderi, "Cryptanalysis of improved Yeh et al.'s authentication Protocol: An EPC Class-1 Generation-2 standard compliant protocol," http://eprint.iacr.org/2011/426.pdf, 2011.
 A. Mohammadali, Z. Ahmadian, and M. R. Aref, "Analysis and Improvement of the securing RFID systems conforming to EPC Class 1 Generation 2 standard," IACR Cryptology ePrint Archive, vol. 66, pp. 1-9, 2013.
 K. Baghery, B. Abdolmaleki, B. Akhbari, and M. R. Aref, "Privacy analysis and improvements of two recent RFID authentication protocols," in 11th International ISC Conference on Information Security and Cryptology (ISCISC), Tehran, 2014.
 S.-P. Wang, Q.-M. Ma, Y.- L. Zhang, and Y.-S. Li, "A HMAC-Based RFID Authentication Protocol," in 2nd International Symposium on Information Engineering and Electronic Commerce (IEEC), 2010.
 J.-S.Cho, S.-S. Yeo, and S. K. Kim, "Securing against brute-force attack: A hash-based RFID mutual authentication protocol using a secret value," Computer Communication, vol. 34, pp. 391-397, 2011.
 J. Cho, S-C. Kim, and S. K. Kim, "Hash-based RFID tag mutual authentication scheme with retrieval efficiency," in 9th IEEE International Symposium on Parallel and Distributed Processing with Applications, 2011.
 S. W. Jung, and S. Jung, "HMAC-based RFID authentication protocol with minimal retrieval at server," The Fifth International Conference on Evolving Internet, pp. 52-55, 2013.
 Y. C. Huang, and J. R. Jiang, "Ultra lightweight RFID reader-tag mutual authentication revisited," in IEEE International Conference on Mobile Services (MS), New York, 2015.
 D. Z. Sun, and J. D. Zhong, "A hash-based RFID security protocol for strong privacy protection," IEEE Transactions on Consumer Electronics, vol. 58, no. 4, pp. 1246-1252, 2012.
 B. Abdolmaleki, K. Baghery, B. Akhbari, and M. R. Aref, "Attacks and improvements on two new-found RFID authentication protocols," in 7th International Symposium on Telecommunications (IST), Tehran, 2014.