With regards to countries that are a danger to other countries I would say it is any country with nukes and similar weapons of mass destruction, a large armed forces, and/or a large military industrial complex/a government that seeks legitimacy through military might or hostile expansionism.
To me this comes down to a list of countries:
-Democratic Republic of Congo (going through a domestic armed conflict during an Ebola outbreak that is not being controlled and could spread to other countries; if it was not for the uncontrolled Ebola outbreak this country would not be on this list)
As for countries that are the most dangerous to live in they are typically ones that are war-torn, impacted by political/gang/cartel violence, have high violent crime rates, and/or are fighting deadly infectious disease etc.
My list of such countries would include:
-Democratic Republic of Congo (going through a domestic armed conflict while an uncontrolled Ebola outbreak is happening)
-Yemen (has totally been demonstrated by the US/Saudi and Iran/Russia proxy war)
-Syria (same as Yemen)
-Afghanistan (was being modernized by Zahir Shah and Daoud Khan; but the Shah's overthrow by Khan and Khan's subsequent assassination was the start of the country's devastation)
-Saudi Arabia (threat of government violence and harsh control of society by the government; women, minorities, political critics are especially vulnerable)
-North Korea(threat of government violence and harsh control of society by the government)
-Central African Republic (civil war, ethnic violence)
-Libya (as a result of the second Libyan Civil War)
-Somalia (insurgency, political conflict)
-South Sudan (civil war)
-Sudan (civil war in the south, and harsh government control)
-Mexico (high crime rate, cartels)
-Brazil (political unrest, high crime rate)
-Venezuela (unrest due to political unrest and severe economic downturn)
-Colombia (same as Mexico)
*I should mention this list is based on the general situation of the country. More specific populations like various religious/ethnic groups, political groups, LGBTQ individuals, etc. might face disproportionate violence in countries that I have not listed as being generally dangerous.