How to get CPE from package? - security

I have a question related to CPE. Does it exist a method that ensure full translation among package installed and its CPE?
Example: package for apache2, in Ubuntu or RedHat, is named apache2 or httpd but its CPE is similar to :apache:http_server: (apache is the vendor and http_server the product name) and obviously if I search for CPE like ::apache2: or ::httpd: I cannot found nothing.
Can you help me please?

You can look up the registered products in the CPE database on https://nvd.nist.gov/products/cpe
Some distributions add CPE information also in the packages, so you can use the package manager to look it up.
Gentoo Linux for instance provides a cpe field in the metadata.xml file.
Additionally you can look up the CPE data in repology which is not authoritative.

Related

The db2prereqcheck utility was unable to determine the Linux distribution level

I am working on Linux Mint and when I tried installing IBM DB2 following the steps in below link,
https://www.ibm.com/support/knowledgecenter/SSEPGG_11.5.0/com.ibm.db2.luw.qb.server.doc/doc/t0008875.html
I got this error in the step when I check installation requirements
DBT3505E The db2prereqcheck utility was unable to determine the Linux distribution level.
What to do?
Linux Mint is not a supported operating system for Db2.
If you dig hard enough, starting with this document, you can determine the supported operating systems:
https://www.ibm.com/support/pages/system-requirements-ibm-db2-linux-unix-and-windows
For Db2 v11.5, the supported Linux operating systems are RHEL7.5, SLES12SP3, or Ubuntu 16.04.
Db2 is "not supported" on Linux Mint. What does that mean?
It means that the paid defect-support channel for Db2 will likely reject requests for help for Db2 on Linux Mint. They will ask you to first recreate the symptom on a supported distribution. That allows them to investigate on a supported distro.
But 'not supported' does not mean that Db2 will not work. Instead, you might need to do additional pre-requsites installation or configuration work, or other troubleshooting activities to solve issues.
For example, Db2 is not supported by the IBM paid defect support when Db2 runs on Centos or Fedora distributions. But Db2 runs happily on these distributions as long as you know what you are doing , and always install from the latest-fixpack-server-build image of Db2 (but never the GA build).
So 'not supported' means that when it goes wrong, it's up to you to find a solution and the paid channel for Db2-defect-support won't help you.
Most companies value their data and want some kind of support so most companies will use a supported distribution. But if you are in a non-production or development environment, and if you have the time and competence and patience to do troubleshooting then you can make progress and learn stuff.
As regards the specific, symptom DBT3505E , there is already an existing answer , always search for the symptom-code first on stackoverflow!

New Custom centos boot disk with parameters from official google cloud setting

I want to change the root filesystem CentOs 6 to Btrfs filesystem.
My solution is to export virtual machine from localhost to GCE, I know the documentation to this job, but I have doubts how does work the process the import of boot disk images (You can import boot disk images from your physical datacenters, from virtual machines on your local workstation, or from virtual machines that run on another cloud platform. )
My question is relation to documenation of https://cloud.google.com/compute/docs/images:
Notable differences from standard CentOS images
Google Compute Engine-provided CentOS images contain the following differences from standard CentOS images:
All packages are updated to the date of the image and the image will reflect the latest CentOS point release.
Google Cloud repositories are enabled to install packages from the Linux Guest Environment for Google Compute Engine.
Google CloudSDK is installed.
IPv6 is disabled as it is not yet supported on Compute Engine.
The eth0 MTU is set to 1460.
DHCP is set to retry every 10 seconds instead of 5 minutes.
The DHCP client is set to persistent mode instead of oneshot.
......
......
......
So my question is, ¿when I imported a boot disk CentOs from my computer to GCE, does GCE apply all this parameters to my boot disk CentOs, so To be compatible with the standard settings of google image CentOs?
If this does not, then:
¿How can i proceed?
I find the solution:
There is a free service that helps with VM migrations but is limited to some OS. CentOS 6.0 is included but I am not sure if it supports the file system you are looking for.
If you cannot use the migration service and you do not want to use the public images provided by Google, then you must take care of the bootloader and all OS configuration you mentioned. You might also want to have a look to this link, in public Google images some daemons are installed by default. They add GCE functionality like syncing the accounts used in your project with the VMs.

I need all name servers (DNS) in linux

If there are multiple NICs on a machine, and each NIC is configured for multiple name servers, I need a list of all of them.
I have written simple java code to parse ipconfig /all in Windows (I need this in java), but getting the same information in Linux seems unclear from researching.
Some articles say "cat /etc/resolv.conf". Some say that is the old way for some distributions and to use nmcli with appropriate arguments and just parse the information.
My research has led me to believe the following is how it probably should be done:
Check of nmcli is available
Check if network-manager is on
if so, parse nmcli output
if not, parse cat /etc/resolv.conf
I am not an expert in linux, so I am seeking validation or correction here.
Thanks for answering!
EDIT: If it helps, I care about RHEL6+ and Suse 11
EDIT2: So per Suse's documentation, parsing resolv.conf seems to be sufficient because they just update the file. Still looking into RHEL.
Looks like reading resolv.conf is a safe bet for the current releases of RHEL and Suse.

How do I install OSSIM (AlienVault SIEM) manually?

AlienVault by default is a .iso image. It installed on the core of Debian. I want to install it on Ubuntu 12.04. How can I do that?! Is it possible or not? (AlienVault is a SIEM product; it is an open-source monitoring security logs .., and is used in a Security Operations Center. I need to install it on Ubuntu. All the files of this product are in the pool directory of its Debian .iso image.
Sadly, you cannot. OSSIM is an installable distribution. There are no individual packages. You can only install on bare system or in VM.
You can install it on VM or operating system. It can not be installed how you want it since it is not a package. If you are asking it having a specific network diagram at the back of your mind that needs to be changed since SIEM will be installed independently, but it can still integrate different operating solutions to itself even after.

Can I use Ubuntu desktop for DNS server

Excuse me,
I have a laptop installed Ubuntu desktop. If I want to use the name server (DNS) in this position, is that possible? Or should I reinstall Ubuntu server?
Yes, you can easily install unbound or bind9 package and serve DNS queries in your LAN.
However, it's a bit more involved to setup the networking so that all the DNS queries made from your applications are directed to the caching DNS server running in the same installation. I had to get rid of NetworkManager and install wicd instead for this purpose. NetworkManager uses dnsmasq package (which doesn't cache queries) and all DNS queries are directed to 127.0.1.1, where dnsmasq listens for queries. wicd makes easy to set a static DNS pointing to 127.0.0.1, which is the address in which unbound listens by default.
Note: of course it isn't impossible to keep the default NetworkManager and setup properly to direct queries to the caching name server running in the same machine. I just think it's easier with wicd.
Yes,you can!But Ubuntu desktop usually have installed many applications,it may not work very well.If it is convenient ,you'd better use Ubuntu server.
The only difference between server and desktop is - which packages are installed by default during distro installation. To use your computer as a DNS server your will have to install package for the DNS server, like apt-get install bind9. For server,maybe it's preinstalled (I don't know). That's all.
As in andy answer, maybe other applications running on Desktop will use too many resources or make your system unstable, and thus you better don't use them. In this case too, if you remove all the GUI-related packages you practically turn "desktop" into "server".
Disclaimer: I'm not an expert, I may be wrong.

Resources