Write a function in Python that takes a list of IP addresses, filters out duplicates, and checks them against a dictionary of known malicious ranges.
Use the function signature def find_malicious_ips(ip_addresses, malicious_ranges):. The dictionary keys are CIDR ranges, such as "203.0.113.0/24"; values are labels and should not affect matching. Return unique matching IP addresses in their original order. All input IP addresses and CIDR ranges are valid IPv4 values.
def find_malicious_ips(ip_addresses, malicious_ranges):