Safety and sustainability of corporate as well as non-corporate networks is a very risky but very essential issue. To offer secure access control as well as minimize disruptions from cyber threats, an integrated paradigm is recommended by this work that computes risk scores of users dynamically by adopting passive monitoring of networks and Deep Packet Inspection (DPI) strategies. The system takes into consideration a few factors like the trustworthiness of DNS servers, type of traffic, weaknesses of protocol, and weaknesses of the operating system. Based on those parameters, a machine learning algorithm assigns every user a dynamic score of risk that's then converted to a trust level (critical, high, medium, low) depending upon the score. Those trust levels are automatically fed into Attribute-Based Access Control mechanisms for varying access permission at a real-time level. A series of simulations demonstrate that such a dynamic approach of risk-based not only enables an increased proactive threat blocking but also minimizes disruptions of operational workflow. Compared with traditional periodic or static strategies, the proposed barometer of security offers an enhanced adaptable as well as responsive approach towards managing access of networks.