ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 28 - CS0-003 discussion

Report
Export

A security analyst is trying to identify possible network addresses from different source networks belonging to the same company and region. Which of the following shell script functions could help achieve the goal?

A.
function w() { a=$(ping -c 1 $1 | awk-F ''/'' 'END{print $1}') && echo ''$1 | $a'' }
Answers
A.
function w() { a=$(ping -c 1 $1 | awk-F ''/'' 'END{print $1}') && echo ''$1 | $a'' }
B.
function x() { b=traceroute -m 40 $1 | awk 'END{print $1}') && echo ''$1 | $b'' }
Answers
B.
function x() { b=traceroute -m 40 $1 | awk 'END{print $1}') && echo ''$1 | $b'' }
C.
function y() { dig $(dig -x $1 | grep PTR | tail -n 1 | awk -F ''.in-addr'' '{print $1}').origin.asn.cymru.com TXT +short }
Answers
C.
function y() { dig $(dig -x $1 | grep PTR | tail -n 1 | awk -F ''.in-addr'' '{print $1}').origin.asn.cymru.com TXT +short }
D.
function z() { c=$(geoiplookup$1) && echo ''$1 | $c'' }
Answers
D.
function z() { c=$(geoiplookup$1) && echo ''$1 | $c'' }
Suggested answer: C

Explanation:

The shell script function that could help identify possible network addresses from different source networks belonging to the same company and region is:

function y() { dig $(dig -x $1 | grep PTR | tail -n 1 | awk -F ''.in-addr'' '{print $1}').origin.asn.cymru.com TXT +short }

This function takes an IP address as an argument and performs two DNS lookups using the dig command. The first lookup uses the -x option to perform a reverse DNS lookup and get the hostname associated with the IP address. The second lookup uses the origin.asn.cymru.com domain to get the autonomous system number (ASN) and other information related to the IP address, such as the country code, registry, or allocation date. The function then prints the IP address and the ASN information, which can help identify any network addresses that belong to the same ASN or region

asked 02/10/2024
TONG CHEE LOONG
35 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first